How do I move existing controls into a groupbox

  • Thread starter Thread starter dan.neely
  • Start date Start date
D

dan.neely

Drag/drop leaves them directly attached to the main form and I can't
find any way to change the hierarchy from the properties page either.
 
Drag/drop leaves them directly attached to the main form and I can't
find any way to change the hierarchy from the properties page either.

Select the controls, Cut, select the groupbox, Paste.

Carl Rapson
 
Select the controls, Cut, select the groupbox, Paste.

This is only working with some types of controls. I can paste
togglebuttons into the groupbox, but command buttons always end up
pasted to the main form. More seriously, any togglebuttons that I
paste loose the OnClick event which I'm using.
 
This is only working with some types of controls. I can paste
togglebuttons into the groupbox, but command buttons always end up
pasted to the main form. More seriously, any togglebuttons that I
paste loose the OnClick event which I'm using.

Command buttons can't (as far as I know) be assigned to a groupbox. If you
go through the Groupbox wizard, you'll see what controls can be used.

It's a common problem that when a control is cut and then pasted, it
sometimes loses the connection with existing events. You'll just need to go
back to the control's Even properties tab and specify the event again, and
it will then re-connect to the existing code.

Carl Rapson
 
Back
Top