AutoIT: GUISetFont VS GUICtrlSetFont

AutoIT: GUISetFont VS GUICtrlSetFont

GUISetFont 可以设置默认字体,后面的资源都会用该字体,而 GUICtrlSetFont 可以对特定控件的字体进行设置。

;Combo,setfont, GUICtrlSetFont
$font= "Comic Sans MS"
$fontlabel= GUICtrlCreateLabel("Combo Test: ", 160, 280, 120, 20)
GUICtrlSetFont($fontlabel,10,20, 2, $FONT)
GUICtrlSetBkColor(-1,$GUI_BKCOLOR_TRANSPARENT)
$comboFont= GUICtrlCreateCombo("", 250, 277, 120, 100, $CBS_DROPDOWNLIST)
GUICtrlSetFont($comboFont,10,20, 2+4, $font)
GUICtrlSetData($comboFont,"Sample Combo|Item2|Item3", "Item3")