I always build my control sets by duplicating the content. So after adding your control to the window, make it a control set then press <Ctrl/Cmd> + d.
Ill try that Wayne. The second control that I need in the set is a Popupmenu and the first one is a textfield. These controls are also in a container control which I assume is ok?
Wayne that worked great for me to copy/paste the existing control set control. I am just trying to get a different control type as a member which isn’t happening for me right now
Not from my perspective
The issue with this and why they have to be all the same type is that the event implementations are shared among ALL members.
One set of implementations for ALL the controls in a set.
Now, if you have a text field & a popup menu in a set they have very different events.
What would the implemented “ACTION” or “CHANGE” even from a popup menu do to the textfield ?
And vice versa as there are events i next fields that have no meaning to a popup menu (in fact ones you can not even add to a popup menu)
If what you need is a way to treat a bunch of different controls as a group then you want a container control
Norman that makes sense and as a newbie I was hoping to use the control set(array) to give me the array index to be able to know how many controls I have and to create more when I press a button. I can do that another way and I learned the value and capabilities of the Control Set along the way. I am already using the container control and I will probably just use a manual index to track them.
I’m still missing something with control sets. The original post says:
Under the control --> member of --> New Control Set
Give it a name etc. Works fine.
Go to control #2 and click on Member OF and I only see “New Control Set” and not the control set I named.
Where do I do step 1 “Under the control --> member of --> New Control Set” in the IDE? I do not see ‘Member Of’, etc. I’m running Xojo 2014r2 on Windows.
Also, I’d like to create my control set and add controls to the window in code, not at design time. Can anyone help me with an example? I’m coming to Xojo from a MS Visual Studio background.