Page 1 of 1

Is it possible to show Tab control above Progress control?

Posted: 22 Sep 2019, 10:08
by m3user
I use progress control to draw a simple colored rectangle but I cannot show a Tab control over it - please see the example. Is this a bug? Any idea how to do this?

Code: Select all

gui, add, progress, xm+40 w100 h100 Background0xa0a0a0 disabled
gui, add, tab2, xm ym+10 w300 h200, Tab one|Tab two
gui, show

Re: Is it possible to show Tab control above Progress control?

Posted: 22 Sep 2019, 15:02
by gregster
You mean like this?
tab.jpg
tab.jpg (3.42 KiB) Viewed 241 times
Then switch the lines...

Re: Is it possible to show Tab control above Progress control?

Posted: 22 Sep 2019, 17:49
by Alguimist
It can be done this way:

Code: Select all

#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1

Gui, Add, Progress, hWndhPrg xm+40 w100 h100 Background0xa0a0a0 Disabled
Gui, Add, Tab3, hWndhTab xm ym+10 w300 h200, Tab one|Tab two
Gui, Show

SendMessage 0xB, 0, 0,, ahk_id %hPrg% ; WM_SETREDRAW
WinSet Redraw,, ahk_id %hTab%
DllCall("SetWindowPos", "Ptr", hTab, "Ptr", 0, "Int", 0, "Int", 0, "Int", 0, "Int", 0, "UInt", 0x3)
Return

GuiEscape:
GuiClose:
    ExitApp

Re: Is it possible to show Tab control above Progress control?

Posted: 23 Sep 2019, 10:41
by m3user
Thanks Alguimist, excellent, although I don't understand what you did... ;)

May I ask if you happen to know how to solve my other issue related to tabs?
https://www.autohotkey.com/boards/viewtopic.php?t=59090

Would it be possible to somehow mask gray colored space on the right of the tabs?