Tab control with gui background is hiding labels Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
colt
Posts: 291
Joined: 04 Aug 2014, 23:12
Location: Portland Oregon

Tab control with gui background is hiding labels

20 Jan 2021, 13:41

I am trying to make a tab control with the tabs on the right side. Everything works great except when I add background color to the gui, then the labels are hidden. Any trick to get them to show up properly? I get the same display with all versions of the tab control

Code: Select all

backgroundColor := "0x7a7a7a" 

Gui, Main:Color ,%backgroundColor% ;causes tabs to be hidden
Gui, Main:Add, Tab,Background%backgroundColor% x5 Right h95 w300 altsubmit, A|B ;want this to work but have text labels visible
Gui, Main:Add, Tab,Background%backgroundColor% yp x+5 hp wp altsubmit, A|B
Gui, Main:Add, Tab2,Background%backgroundColor% x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab2,Background%backgroundColor% yp x+5  hp wp altsubmit, A|B
Gui, Main:Add, Tab3,Background%backgroundColor% x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab3,Background%backgroundColor% yp x+5  hp wp altsubmit, A|B

Gui, Main:Add, Tab,x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab,yp x+5 hp wp altsubmit, A|B
Gui, Main:Add, Tab2,x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab2,yp x+5  hp wp altsubmit, A|B
Gui, Main:Add, Tab3,x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab3,yp x+5  hp wp altsubmit, A|B

Gui, Main:Add, Tab,-Background x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab,-Background yp x+5 hp wp altsubmit, A|B
Gui, Main:Add, Tab2,-Background x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab2,-Background yp x+5  hp wp altsubmit, A|B
Gui, Main:Add, Tab3,-Background x5 Right hp wp altsubmit, A|B
Gui, Main:Add, Tab3,-Background yp x+5  hp wp altsubmit, A|B

gui Main:show,,TEST
WinSet, Redraw,,TEST
what I see
Image
User avatar
mikeyww
Posts: 26942
Joined: 09 Sep 2014, 18:38

Re: Tab control with gui background is hiding labels  Topic is solved

20 Jan 2021, 20:56

This style will not correctly display the tabs if a custom background color or text color is in effect. To workaround this, specify -Background and/or cDefault in the tab control's options.
Perhaps this information applies here as well.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww, septrinus and 289 guests