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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top