Jump to content

Same Control on Multiple Tabs


aommaster
 Share

Recommended Posts

Hey everyone!

Is it possible to have the same GUI control present on multiple tabs? I have a bunch of buttons that behave like a toolbar, and I have edit boxes on two different tabs, both which must be able to be manipulated by the same buttons.

To get around the message box identity, I defined the functions according to a different variable, $activeedit, and used a GUICTRLSetOnEvent for the tab control so that it would redefine $activeedit when the tab was changed.

However, I'd now like to also have those buttons on the second tab. Is there a way of doing it without creating a whole bunch of new buttons, since they are identical in terms of functions they call and looks.

Thanks

Link to comment
Share on other sites

Hey everyone!

Is it possible to have the same GUI control present on multiple tabs? I have a bunch of buttons that behave like a toolbar, and I have edit boxes on two different tabs, both which must be able to be manipulated by the same buttons.

To get around the message box identity, I defined the functions according to a different variable, $activeedit, and used a GUICTRLSetOnEvent for the tab control so that it would redefine $activeedit when the tab was changed.

However, I'd now like to also have those buttons on the second tab. Is there a way of doing it without creating a whole bunch of new buttons, since they are identical in terms of functions they call and looks.

Thanks

If you move the button creation to after the 'end tab' definition line then the buttons will show whichever tab is selected. You can hide them by setting their states to $GUI_HIDE.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Hi Martin!

Thanks for your reply. However, the position of these buttons are different in every tab. Is there a way of getting around this?

Thanks again

well you could set the postion of the buttons whenever the tab changed.

I think I would probably just duplicate the buttons because that would allow me to make the tabs behave differently if I ever wanted, and it would make the design easier because it could be done with Koda rather than programmatically.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...