How to move a tab sub-control to another tab

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rodemp
Posts: 44
Joined: 15 Nov 2016, 00:28

How to move a tab sub-control to another tab

18 Sep 2018, 00:13

Code: Select all

Gui, add, tab3, w300 h300, tab1|tab2|tab3|tab4|
Gui, tab, 1
Gui, add, Edit, vedit1 ReadOnly, tab1 sub control
Gui, tab, 2
Gui, add, Edit, vedit2 ReadOnly, tab2 sub control
Gui, tab, 3
Gui, add, Edit, vedit3 ReadOnly, tab3 sub control
Gui, tab, 4
Gui, add, Edit, vedit4 ReadOnly, tab4 sub control
Gui, tab
Gui, show
return

GuiEscape:
GuiClose:
ExitApp
I want to move the edit1 control located in tab1 to tab3
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: How to move a tab sub-control to another tab

18 Sep 2018, 00:26

Code: Select all

Gui, add, tab3, w300 h300, tab1|tab2|tab3|tab4|
Gui, tab, 2
Gui, add, Edit, vedit2 ReadOnly, tab2 sub control
Gui, tab, 3
Gui, add, Edit, vedit3 ReadOnly, tab3 sub control
Gui, tab, 4
Gui, add, Edit, vedit4 ReadOnly, tab4 sub control
Gui, add, Edit, vedit1 ReadOnly, tab1 sub control
Gui, show
return
GuiClose:
ExitApp
rodemp
Posts: 44
Joined: 15 Nov 2016, 00:28

Re: How to move a tab sub-control to another tab

18 Sep 2018, 00:55

Oh.I did not have enough explanation. I intended to do this. https://stackoverflow.com/questions/243 ... to-another

Code: Select all

    private void ControlsToTabPage(TabPage from, TabPage to)
    {
        Control[] ctrlArray = new Control[from.Controls.Count];
        from.Controls.CopyTo(ctrlArray, 0);
        to.Controls.AddRange(ctrlArray);
    }

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: wilkster and 319 guests