找回密码
 加入
搜索
查看: 2100|回复: 4

[GUI管理] gui如何根据控件长度调整大小

  [复制链接]
发表于 2017-5-22 14:10:27 | 显示全部楼层 |阅读模式
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
 楼主| 发表于 2017-5-22 17:01:52 | 显示全部楼层
在线等回复
发表于 2017-5-23 19:06:00 | 显示全部楼层
我记得它有个类似于”适应文字“的功能参数的,你找找
发表于 2017-6-6 21:23:35 | 显示全部楼层
StringLen
返回字符串的长度. 


StringLen ( "string" )
获取字符串长度,,然后设置控件长度,gui大小
发表于 2017-6-17 13:33:50 | 显示全部楼层
纯支持一下,谢谢分享
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-20 17:03 , Processed in 0.076367 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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