Usercontrol resize?

  • Thread starter Thread starter Able
  • Start date Start date
A

Able

Dear friends

I have placed a Listbox on a Usercontrol. How do I move the Listbox to upper
left corner and make the listbox same size as usercontrol when resizing
usercontrol in designtime?

Regards Able
 
* "Able said:
I have placed a Listbox on a Usercontrol. How do I move the Listbox to upper
left corner and make the listbox same size as usercontrol when resizing
usercontrol in designtime?

Anchor the control to the usercontrol's borders ('Anchor' property).
 
Able said:
I have placed a Listbox on a Usercontrol. How do I move the Listbox
to upper left corner and make the listbox same size as usercontrol
when resizing usercontrol in designtime?

Have a look at the Dock property. To fully fill the Usercontrol, set it to
"Fill". The Anchor property might also be useful.

If there are no other controls in the Usercontrol and the Listbox always
totally fills the control, you might consider deriving your own Listbox from
the Listbox class instead of creating a Usercontrol.
 
Back
Top