gui如何根据控件长度调整大小
GUICtrlCreateLabel根据内容自动调整长度,GUI又根据GUICtrlCreateLabel的长度自动调整大小
--------------------------------------------------------
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 615, 437, 192, 124)
$Label1 = GUICtrlCreateLabel(@ComputerName, 10, 10, -1, -1)
GUICtrlSetFont(-1, 12, 400, 0, "宋体")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd 在线等回复 我记得它有个类似于”适应文字“的功能参数的,你找找 StringLen
返回字符串的长度.
StringLen ( "string" )获取字符串长度,,然后设置控件长度,gui大小 纯支持一下,谢谢分享
页:
[1]