MrBeatnik Posted November 18, 2010 Share Posted November 18, 2010 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 initilisationLater (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. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 18, 2010 Moderators Share Posted November 18, 2010 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 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
MrBeatnik Posted November 18, 2010 Author Share Posted November 18, 2010 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. M23M23, 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! 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. Link to comment Share on other sites More sharing options...
MrBeatnik Posted November 18, 2010 Author Share Posted November 18, 2010 Found it: GUISwitchGUISwitch ( 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. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 18, 2010 Moderators Share Posted November 18, 2010 MrBeatnik, And thank you for posting that - I have learnt something new today. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now