Need an advice for a small designer window

I want to create a small design panel form.
the panel contain 4groupbox,each groupbox contains 1…20 checkbox. everything is dynamic.
I mean I can drag a chebox to groupbox,and can resize groupbox with mouse…
is it diffcult to do this? thx

Drag a checkbox to the form, make it member of a control set and then you can create copies of that, through code, which will allow you to create a dynamic interface… If you checkbox is called “myCheckbox” and is member of a control set, to add a new one just do DIM newCheckbox As NEW myCheckbox and then set all the properties and coordinates…

Or, drag twenty checkboxes to the form and then just show and hide them as needed…

there is a mistaken… I not willing to drag the items by xojo ide…
by my desiger panel…

To create a control, you need to have the control in your application, therefore you need to have at least one dragged in from the IDE… Once you have that one, make it a member of a control set, make it hidden and then use the code, from above, to create new controls on the fly…

do you have a small case example?thanks

Drag a checkbox to your window, I’d recommend moving it off the actual window, but up to you
Rename the checkbox to “MyCheckbox”
Click on the gear icon, on the Properties palette and make it a member of a new control set
Add a button to your window, add the following code:

[code]Sub Action() Handles Action
DIM newCheckbox As MyCheckbox

for i as integer = 0 to 9
newCheckbox = NEW MyCheckbox
newCheckbox.Top = i * 24
newCheckbox.Caption = "CheckBox " + Str(i)
newCheckbox.Visible = TRUE
next
End Sub[/code]

thanks…

or you can create controls dynamically by placing them on Container controls. At runtime you create a new instance of that container using the new command and use the Embed commands to put them on your window. It’s more work up front but then you don’t have to have an instance of that control on your window at design time.

Container controls are one of the great strengths of Xojo. It isn’t mentioned enough, in my opinion.

[quote=345545:@Bob Keeney]or you can create controls dynamically by placing them on Container controls. At runtime you create a new instance of that container using the new command and use the Embed commands to put them on your window. It’s more work up front but then you don’t have to have an instance of that control on your window at design time.

Container controls are one of the great strengths of Xojo. It isn’t mentioned enough, in my opinion.[/quote]

OK?I will try this…