Sign in to follow this  
Followers 0
MrBeatnik

Add control to TAB (or group, etc)

5 posts in this topic

Hi.

I have created a form with tabs.

Much later on a function wants to add some more controls (labels) to a specific tab.

How can I make sure the GUICtrlCreateLabel is created INSIDE the tab control, rather than directly on the form.

A standard GUICtrlCreateLabel will insert the controls on top of the master tabsheet, so no matter which tab you go to you always see this newly crated data.

I suppose this would be like having a group created on the form at initilisation

Later (button press for example) you want to add some radio buttons to that group control, rather than directly on the form.

Any suggestions?

Thanks.


Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites



MrBeatnik,

Create all the controls when you create the tabs, but use GUISetState to hide the ones you are not going to use. Then just show them again in your function rather then creating them. :graduated:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

MrBeatnik,

Create all the controls when you create the tabs, but use GUISetState to hide the ones you are not going to use. Then just show them again in your function rather then creating them. :(

M23

M23, thanks for the response.

I was originally doing this, but there can be ... in theory.. an infinite number of controls as the data is coming from an external source:

If I set them when I create the tabs, then I have to have a fixed amount to beging with.

Hiding them is fine if there is less than the fixed amount, but if there is more then I have to start coding some "page controls" to move to the next 50 etc. I also have a "select all" checkbox which would select all "records" where an action could be performed. I would have to have extra coding to check for only visible objects, and only those on the "current page". It can be done... but I was hoping for a quicker solution! :graduated:

So I presume from your response, my request cannot be done due to the way forms and controls are created?

I would have to go down another route to manage a high volume of dynamic controls?

Thanks.


Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites

Found it: GUISwitch

GUISwitch ( winhandle [, tabitemID] )

A carefully crafter search term got me a similar thread.

Didn't find this in my initial search:


Please correct me if I am wrong in any of my posts. I like learning from my mistakes too.

Share this post


Link to post
Share on other sites

MrBeatnik,

And thank you for posting that - I have learnt something new today. :graduated:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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
Sign in to follow this  
Followers 0