【发布时间】:2018-04-19 11:29:05
【问题描述】:
我对自动热键的这方面不太熟悉。不久前,我编写了一个在我的笔记本电脑和扩展坞监视器上都可以使用的 GUI。最近我用一个更大的显示器替换了我现有的显示器。现在我的按钮对于文本来说显得太小了,并且窗口的位置还有一些其他的变化。
我希望我的 GUI 能够在笔记本电脑本身和对接时正常工作。
另外请解释一下是什么原因造成的。
【问题讨论】:
标签: user-interface screen autohotkey monitor
我对自动热键的这方面不太熟悉。不久前,我编写了一个在我的笔记本电脑和扩展坞监视器上都可以使用的 GUI。最近我用一个更大的显示器替换了我现有的显示器。现在我的按钮对于文本来说显得太小了,并且窗口的位置还有一些其他的变化。
我希望我的 GUI 能够在笔记本电脑本身和对接时正常工作。
另外请解释一下是什么原因造成的。
【问题讨论】:
标签: user-interface screen autohotkey monitor
一些例子。
Gui, Add, Button, gButtons vButton1, Button1 | auto position and size
Gui, Add, Button,y+40 gButtons vButton2, Button 2 | y is relative to Button1 +40 ;same x as Button1
Gui, Add, Button,x+60 gButtons vButton3, Button 3 | x is relative to Button2 +60 ;same y as Button2
Gui, Add, Button, x200 y200 gButtons vButton4, Button 4 | Fixed position x=200 y=200
Gui, Add, Button, x15 y250 w200 h60 gButtons vButton5, Button 5 | Fixed position, width and hight
Gui, Add, Button, y+20 wp+100 hp-30 gButtons vButton6, Button 6 | Relative y, width and hight to button 5 width increased +100 and h decreased by 30
Gui, Add, Button, y+20 wp hp gButtons vButton7, Button 7 | Relative y, and same width and hight as button 5
Gui, Add, Button, y+20 wp w150 h30 gButtons vButton8, Button 8 | Mistake too much text and w and h are fixed and too small
Gui, Add, Button,x+10 gButtons vButton9, Button 9 | A lot of text but w`nand h are not fixed ;if you dont put new line it would all go in 1 line
Gui,Add,Button,x240 y480 gGuiClose,Exit
Gui, Show, w500 h500
return
GuiClose:
ExitApp
Buttons:
return
有关控件的定位和大小的更多信息 https://autohotkey.com/docs/commands/Gui.htm#PosSize
【讨论】: