Array of Controls

Hi
(VB6er checking in)
I downloaded the trial xojo and cant figure out how to create an array of controls.

I read a previous thread about this on here on the same topic but it was useless because most people replying didnt even understand what an array is.

So How do u make an array of controls ?
Thanks in advance
Kind regards

In Xojo they are now called CONTROL SETS, and the attribute for this can be reached by clicking the GEAR icon at the top of the inspector (latest version, it is on main inspector screen in previous versions where it belongs)

  1. place a control on the window
  2. give it a unique name
  3. click the control set drop down
  4. select “Create new control set”

That control will now have an index of “0”

Either use the DUPLICATE control to add others
or repeat above, replacing step 4 with choosing the control set name from the list.

Once a Zero index control is on the window, you can also create other members of the set in code if required.

So what if I don’t know how many controls I want.
How do I add more at run time and position them on the window?

Have a look at the example. Examples->Desktop->Control Sets.

HTH
Wayne

I see container controls… no control sets…
Still applicable?

No, very different. Its under Examples->Desktop->Controls->ControlSet

The code to look at is in the ControlCountPopup.Change event.

Ok I tried to port this to a web app
I must say this is very much what I expect code wise on how things should work.
however I have a bug … not sure what I’ve done wrong.

https://www.dropbox.com/s/4y7rh76elj4j6b8/WebControlSets.xojo_binary_project?dl=0

Can you see why?

[quote=172433:@Brian O’Brien]Ok I tried to port this to a web app
I must say this is very much what I expect code wise on how things should work.
however I have a bug … not sure what I’ve done wrong.

https://www.dropbox.com/s/4y7rh76elj4j6b8/WebControlSets.xojo_binary_project?dl=0

Can you see why?[/quote]

Web does not support creating controls dynamically though control sets. Use WebContainers instead.