Responsive GUI Topic is solved
Responsive GUI
Is there a possibility to use percentage or make a GUI scaleable to become responsive? We're sitting o different sizes of screens. Sometimes on Laptops, sometimes 32" sometimes on 21" and so on. And to make it more complex, some have the default 125% zoom and some have 100 and otherds 150%. If I make a gui that fits perfetly on my screen, it will be too big or small on others. Suggestions?
Re: Responsive GUI Topic is solved
Have you tried using the built-in A_ScreenWidth and A_ScreenHeight variables?
Replace "50" on each of the first two lines with the percentages that you actually want.
Code: Select all
GuiWidth := A_ScreenWidth*0.50
GuiHeight := A_ScreenHeight*0.50
Gui, New
Gui, Show, W%GuiWidth% H%GuiHeight%
Return
GuiClose:
ExitApp
Return
Re: Responsive GUI
Didn't know that existed. Thank yoU!Osprey wrote:Have you tried using the built-in A_ScreenWidth and A_ScreenHeight variables?
Replace "50" on each of the first two lines with the percentages that you actually want.Code: Select all
GuiWidth := A_ScreenWidth*0.50 GuiHeight := A_ScreenHeight*0.50 Gui, New Gui, Show, W%GuiWidth% H%GuiHeight% Return GuiClose: ExitApp Return
- divanebaba
- Posts: 805
- Joined: 20 Dec 2016, 03:53
- Location: Diaspora
Re: Responsive GUI
If you using resizeable Gui's, the build in GuiSize label creates A_ScreenWidth and A_ScreenHeight.
Use +resize option like below
Use +resize option like below
Code: Select all
Gui, Caption +Resize
...
GuiSize:
msgbox % "A_ScreenWidth " A_ScreenWidth "`n`nA_ScreenHeight " A_ScreenHeight
return
Einfach nur ein toller Typ.
Who is online
Users browsing this forum: cjsmile999 and 359 guests