The routine label would need to start with the GUI name if there is one (e.g.,
2ButtonButton1), and your top routine would also add that name. You can use
Gui, Guiname:Default at the top of each thread.
Code: Select all
Gui, 2:Default
Gui, Font, s10
Gui, Add, Button, x40 y40 w70 h40, Button1
Gui, Show, w400 h400, Test
Return
2ButtonButton1:
Gui, 2:Default
Gui, Add, Tab3,, Sheet1|Sheet2|Sheet3|Sheet4
Gui, Tab, Sheet1
Gui, Add, ListView, w200 h200, A|B|C|D|E
LV_Add("", "A1", "A10", "A40", "A70"), LV_Add("", "B1", "B20", "B50", "B80")
Return
An alternative is below.
Code: Select all
Gui, Font, s10
Gui, Add, Button, x40 y40 w70 h40, Button1
Gui, Add, Tab3, w540 h820 vtabs, Sheet1|Sheet2|Sheet3|Sheet4
Gui, Tab, Sheet1
Gui, Add, ListView, w200 h200, A|B|C|D|E
LV_Add("", "A1", "A10", "A40", "A70"), LV_Add("", "B1", "B20", "B50", "B80")
GuiControl, Hide, tabs
Gui, Show, h400 w400, Test
Return
ButtonButton1:
GuiControl, Show, tabs
Return
For different GUIs with your approach:
Code: Select all
Gui, Font, Norm S10 W600 cblack , Tahoma
Gui, Add, Button, x40 y40 w70 h40, Button1
Gui, Show, x27 y87, Window
Return
ButtonButton1:
Gui, 2:Default
Gui, Font, S10 W600, Tahoma
Gui, Add, Tab3, w440 h320, Sheet1|Sheet2|Sheet3|Sheet4
Gui, Tab, Sheet1
Gui, Add, ListView, w200 h200, A|B|C|D|E
LV_Add("", "A1", "A10", "A40", "A70"), LV_Add("", "B1", "B20", "B50", "B80")
Gui, Show,, New window
Return
Or:
Code: Select all
Gui, Font, s10
Gui, Add, Button,, Button1
Gui, Show, x100 y100, Actions
Gui, 2:Default
Gui, Font, s10
Gui, Add, Tab3, w440 h320, Sheet1|Sheet2|Sheet3|Sheet4
Gui, Tab, Sheet1
Gui, Add, ListView, w200 h200, A|B|C|D|E
LV_Add("", "A1", "A10", "A40", "A70"), LV_Add("", "B1", "B20", "B50", "B80")
Return
ButtonButton1:
Gui, 2:Show,, Sheets
Return