TreeView Resize

D

Diogene Laerzio

I'd like to allow user to resize a treeview control in a form at
runtime. What properties should I set to allow this?

Thank you.
 
N

Nicholas Paldino [.NET/C# MVP]

Diogene,

This is a bit of a challenge. If you are going to allow the user to
resize with the mouse, then you ^should^ draw the handles on the edges to
indicate that you are allowing the control to be resized. You will have to
note when the user presses the button down on the edges, and then perform a
repaint operation.

You then need to track the mouse, and resize (and repaint) the control
appropriately, until the mouse button is released.

Needless to say, it's not a trivial task.
 
D

Diogene Laerzio

Maybe it's simpler to put the treeView into a resizable control and
give the treeView a dock=fill property but this is not what I wanted.

Thank you.

Diogene,

This is a bit of a challenge. If you are going to allow the user to
resize with the mouse, then you ^should^ draw the handles on the edges to
indicate that you are allowing the control to be resized. You will have to
note when the user presses the button down on the edges, and then perform a
repaint operation.

You then need to track the mouse, and resize (and repaint) the control
appropriately, until the mouse button is released.

Needless to say, it's not a trivial task.

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)




I'd like to allow user to resize a treeview control in a form at
runtime. What properties should I set to allow this?
Thank you.- Nascondi testo tra virgolette -

- Mostra testo tra virgolette -
 

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

Top