在设置字体越大时为何前面的方框越靠下?
具体代码可参照 http://www.autoitx.com/forum.php?mod=viewthread&tid=8198&extra=page%3D1其中的#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
Opt('MustDeclareVars', 1)
#Region ### STARTGUI section ###
Local $Mac, $treeview, $pctest, $btn1, $btn2
Local $jls = 0
Local $tree
$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 ### endGUI 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 orGUICtrlRead($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在同一水平线上? {:3_88:}要那么大干什么啊12的字体很合适啊 我试了下 基本是平的啥 有需要才这样啊,要不就不会问了,大侠有解决方案不?
页:
[1]