Don't reposition tabs rows when clicked.

Get help with using AutoHotkey and its commands and hotkeys
KilliK
Posts: 224
Joined: 10 Mar 2016, 21:19

Don't reposition tabs rows when clicked.

26 Oct 2019, 08:19

Hello.
I have created a GUI box with two tabs rows. I was wondering if there is a way for the tabs rows to not swap whenever I click one of the tabs in the background row.
here is what I mean:

normal rows:
Image

reversed rows:
Image

when I click the behind row, it is brought in front and vice versa. I want to prevent this because it confuses my muscle memory.
I tried the Buttons option in the Tab2 command, the buttons do stay in the same place but their layout is awful. :(
is there some other method I can use so the rows stay in the same place when I click them?

here is my code:

Code: Select all

Gui, +AlwaysonTop +LastFound  +ToolWindow -Caption +Border -Resize
gui_hwnd := WinExist()
Gui, Color, White
Gui, Font, s10, Arial bold
Gui, Add, Tab2, x12 y8 h46 AltSubmit -Border -Background +Theme, Tab1|Tab2|Tab3|Tab4|Tab5|Tab6|Tab7|Tab8|Tab9|Tab10
Gui, Tab, 1
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab,
Gui, Add, button, x80 section w200 h35, EXIT
Gui, Add, Button, ys w0 h0 Hidden, OK
Gui, Tab, 2
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 3
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 4
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 5
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 6
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 7
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 8
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 9
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Tab, 10
Gui, Add, button, section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35, 
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35, 
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Add, button, xs section w150 h35,
Gui, Add, button, ys w150 h35,
Gui, Font
Gui, Show, Center, Work Selector
Return
User avatar
boiler
Posts: 3315
Joined: 21 Dec 2014, 02:44

Re: Don't reposition tabs rows when clicked.

26 Oct 2019, 08:36

Yes, you can add the Buttons option to your Gui, Add, Tab options, and they will stay in place when you click them. They will have a button look instead of tabs, but there really wouldn't be a way to keep their tab look and not change rows when you click them.
KilliK
Posts: 224
Joined: 10 Mar 2016, 21:19

Re: Don't reposition tabs rows when clicked.

26 Oct 2019, 08:45

can I at least change the look of the buttons? how can I configure their layout?
User avatar
boiler
Posts: 3315
Joined: 21 Dec 2014, 02:44

Re: Don't reposition tabs rows when clicked.

26 Oct 2019, 08:58

You can change the x, y, w, and h values in the options to change the area in which it creates the buttons. You can change the font to change the size of the buttons and their text.

Return to “Ask For Help”

Who is online

Users browsing this forum: badnecros, Bing [Bot], boiler and 211 guests