473,408 Members | 2,027 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

TreeView Resize

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.

Oct 18 '07 #1
2 6072
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]
- mv*@spam.guard.caspershouse.com

"Diogene Laerzio" <di*************@gmail.comwrote in message
news:11*********************@v23g2000prn.googlegro ups.com...
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.

Oct 18 '07 #2
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.

On 18 Ott, 17:43, "Nicholas Paldino [.NET/C# MVP]"
<m...@spam.guard.caspershouse.comwrote:
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]
- m...@spam.guard.caspershouse.com

"Diogene Laerzio" <diogene.laer...@gmail.comwrote in message

news:11*********************@v23g2000prn.googlegro ups.com...
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 -

Oct 18 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: fgh | last post by:
Hello, two questions please: 1) In a treeview, I want to display folders like it is done in Windows Explorer. Do I have to do this manually or can I set something up in VS.NET 2003? 2) Most...
5
by: Ian Stiles | last post by:
I have tried everything under the sun to get rid of horrible flashing and flickering that occurs on a CSharp form when the form hosts a TreeView or WebBrowser control and then you resize the form....
1
by: Terry | last post by:
I've seen several posts from people who have seen this flashing in TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a...
5
by: rh | last post by:
I created a user control that is made up of a TreeView and a VScrollBar. I set the TreeView.FullRowSelect = True and it works as expected (full row is visible, appears on top of everything else)...
0
by: Bart Schelkens | last post by:
Hi, I'm working with the Microsoft.Web.UI.WebControls.TreeView. I've put it in a <div></div> so that it would display scrollbars whenever the text was too wide or too high. Now how can I...
3
by: Juan Romero | last post by:
Hey guys, Does anyone know how to get the width of of the client area of the treeview control? What I am trying to do is let the users double click on a split control and have the treeview...
1
by: bill | last post by:
I am using VS 2005 (VB.NET) web forms. I have a webforms Master page, using a header and left side template. I have a content form with a ASP 2 treeview control in the content placeholder on...
6
by: Pucca | last post by:
My container with 2 panels containning Treeveiw and Listview controls are chopped off on the top by the toolstripmenu when I dock the these 2 contols in the parent container and the container is...
1
by: kriz | last post by:
Hello Is it possible to resize icons in treeview, it seems its always 16x16 Or maybe its possible to put picutre of custom size into treeview, somehow ....
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.