Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

AHK Gui is not updating the tab width

I have a gui with 3 tabs. I just want the inner tab rectangle to be slightly smaller than the GUI itself but its way smaller (see image). The desired size would be as large as the red rectangle I have overlayed on the image. How do I do this? changing the w500 h499 to higher or lower values appears to have no affect on this inner rectangle. But it used to change it… i dont know what happened/changed. Any insight? this has to be something basic I’m missing.

Gui Example

#SingleInstance, Force 

GuiWidth := "w630" ;setting gui width as variable
GuiHeight := "h500" ;setting gui height as variable

;Tabs
Gui, Color, Black
Gui, Font, cWhite 
Gui, Add, Tab3, % x0 y0 w500 h499, 1|2|3

Gui, Tab, 1
Gui, Color, Black
Gui, Font, cWhite s12
Gui, Add, Text, ,Useful Tools

;SWID and Customer Portal Launcher
Gui, Add, Text, , SWID
Gui, Font, cBlack s10
Gui, Add, Edit, vSWID1 gSubmit_swid x+10 w100 hp, SW
Gui, Add, Button, x+5 hp gPortal,Launch Portal

Gui Show, % GuiWidth GuiHeight, Shortcuts   

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You are utilizing a percentage expression (%) in the GUI tab parameters, therefore, you need to encapsulate the options within quotation marks or remove the expression (%).

#SingleInstance, Force 

GuiWidth := "w630" ;setting gui width as variable
GuiHeight := "h500" ;setting gui height as variable

;Tabs
Gui, Color, Black
Gui, Font, cWhite 
Gui, Add, Tab3, % "x0 y0 w500 h499", 1|2|3
;  Gui, Add, Tab3, x0 y0 w500 h499, 1|2|3 ; or just remove the %

Gui, Tab, 1
Gui, Color, Black
Gui, Font, cWhite s12
Gui, Add, Text, ,Useful Tools

;SWID and Customer Portal Launcher
Gui, Add, Text, , SWID
Gui, Font, cBlack s10
Gui, Add, Edit, vSWID1 gSubmit_swid x+10 w100 hp, SW
Gui, Add, Button, x+5 hp gPortal,Launch Portal

Gui Show, % GuiWidth GuiHeight, Shortcuts   
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading