找回密码
 加入
搜索
查看: 1959|回复: 2

在设置字体越大时为何前面的方框越靠下?

[复制链接]
发表于 2009-7-7 18:46:48 | 显示全部楼层 |阅读模式
具体代码可参照 http://www.autoitx.com/forum.php ... &extra=page%3D1
其中的
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
 
Opt('MustDeclareVars', 1)
 
#Region ### START  GUI section ###
Local $Mac, $treeview, $pctest, $btn1, $btn2
Local $jls = 0
Local $tree[8]
$pctest = GUICreate("示例        ", 200, 300)
GUICtrlSetState(-1, $Gui_Disable)
GUICtrlCreateGroup("选中后保存", 40, 75, 105, 220)
GUICtrlCreateGroup("", 5, 420, 510, 35)
GUICtrlSetBkColor(-1, 0xf5deb3)
GUISetFont(10, 400, 1)
$treeview = GUICtrlCreateTreeView(55, 95, 75, 160, $TVS_CHECKBOXES)
For $i = 0 To UBound($tree)-1
        $tree[$i] = GUICtrlCreateTreeViewItem("test" & $i+1, $treeview)
        If IniRead("txt.txt", "config", "tree" & $i, 0) = 1 Then
                GUICtrlSetState($tree[$i], $GUI_CHECKED)
        EndIf
Next
$btn1 = GUICtrlCreateButton("保存", 45, 260, 45, 25, $BS_DEFPUSHBUTTON)
$btn2 = GUICtrlCreateButton("退出", 95, 260, 45, 25)
 
GUISetState()
#EndRegion ### end  GUI section ###
 
;-------------------------------------------------------------------------------------------------------------------------
While 1
        Switch GUIGetMsg()
                Case $GUI_EVENT_CLOSE
                        Exit
                Case $btn1
                        If MsgBox(4, "提示", "保存吗?") = 6 Then
                                For $i = 0 To UBound($tree)-1
                                        If GUICtrlRead($tree[$i]) = 1 or  GUICtrlRead($tree[$i])=257 Then
                                                IniWrite("txt.txt", "config", "tree" & $i, 1)
                                        Else
                                                IniWrite("txt.txt", "config", "tree" & $i, 0)
                                        EndIf
                                Next
                        EndIf
                Case $btn2
                        ExitLoop
        EndSwitch
WEnd
其中的设置字体GUISetFont(10, 400, 1)中的10越大时,test前面的方框就越靠下,不知有无办法让其与后面的TEST在同一水平线上?
发表于 2009-7-8 16:00:25 | 显示全部楼层
要那么大干什么啊  12的字体很合适啊 我试了下 基本是平的啥
 楼主| 发表于 2009-7-9 13:09:01 | 显示全部楼层
有需要才这样啊,要不就不会问了,大侠有解决方案不?
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-5-19 23:41 , Processed in 0.076832 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表