Control Sets -- What am I missing

I can’t get a second control into my new control set.

  1. Under the control --> member of --> New Control Set
  2. Give it a name etc. Works fine.
  3. Go to control #2 and click on Member OF and I only see “New Control Set” and not the control set I named.

I tried restarting Xojo and same result. I looked at Book 2 User Interface section 16 and I don’t appear to be missing anything. Help pretty please? :slight_smile:

I am using Xojo 2013 R2. Thanks!

This maybe the same issue.
(Xojo: Account Login)>Feedback #29044

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 :slight_smile:

As far as I’m aware all controls in a set must be the same type. You can use containers, but I believe you must use embedwithin.

You can place control sets on containers at design time, I have done that many times, but they must all be the same control type.

Thank Roger… That stinks that they have to be the same control type.

Not from my perspective :stuck_out_tongue:
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.

Thanks

Hi all,

I’m still missing something with control sets. The original post says:

  1. Under the control --> member of --> New Control Set
  2. Give it a name etc. Works fine.
  3. 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.

Thanks.

Click on the gear icon on top of the inspector

You create the control set in the inspector, and then here is how to create new controls in code (for Desktop) :
http://documentation.xojo.com/index.php/New

See the button clone example.

Thanks.