Gui in a Tab Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Liaxim
Posts: 35
Joined: 09 Jan 2020, 05:14

Gui in a Tab

12 Mar 2020, 16:23

Hello guys,

I want to make a Gui into a Tab. How is this working?

Code: Select all

Gui, Add, Tab, x12 y9 w770 h380, First|Second|Third
Gui, Tab, First, ;(gui..)
teadrinker
Posts: 4331
Joined: 29 Mar 2015, 09:41
Contact:

Re: Gui in a Tab  Topic is solved

13 Mar 2020, 07:59

Hello,
A couple of examples:

Code: Select all

Gui, Main: Default
Gui, Add, Tab3, x12 y9 w770 h380 hwndhTab vTab gTab, First|Second|Third
hParent := DllCall("GetWindow", Ptr, hTab, UInt, GW_HWNDNEXT := 2, Ptr)

Gui, First: Default
Gui, +Parent%hParent% -Caption +ToolWindow
Gui, Color, B4CAEA
Gui, Add, Text,, Gui First
Gui, Show, NA x5 y5 w750 h345

Gui, Main: Show
Return

Tab() {
   GuiControlGet, Tab, Main:
   Gui, First: Show, % Tab = "First" ? "NA" : "Hide"
}

MainGuiClose() {
   ExitApp
}
 

Code: Select all

Gui, Main: Default
Gui, Add, Tab3, x12 y9 w770 h380 hwndhTab vTab gTab, First|Second|Third
hParent := DllCall("GetWindow", Ptr, hTab, UInt, GW_HWNDNEXT := 2, Ptr)

for k, v in ["First", "Second", "Third"] {
   Gui, %v%: Default
   Gui, +Parent%hParent% -Caption +ToolWindow
   Random, rand, 0, 0xFFFFFF
   Gui, Color, % Format("{:X}", rand)
   Gui, Add, Text,, Gui %v%
   Gui, Show, NA x5 y5 w750 h345
}

Gui, Main: Show
Return

Tab() {
   global Tab
   Gui, %Tab%: Hide
   GuiControlGet, Tab, Main:
   Gui, %Tab%: Show, NA
}

MainGuiClose() {
   ExitApp
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Joey5, lechat, sebalotek and 280 guests