我对autohotkey的这方面不太熟悉。不久前,我写了一个GUI,可以在我的笔记本电脑和我的扩展坞监视器上工作。最近我用更大的显示器替换了我现有的显示器。现在我的按钮对于文本来说显得太小了,窗口的位置还有一些其他的变化。
我希望能够让我的GUI在笔记本电脑之间以及它停靠时正常工作。
另外请向我解释是什么造成的。
答案 0 :(得分:1)
一些例子。
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