473,785 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 6117
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.co m

"Diogene Laerzio" <di************ *@gmail.comwrot e in message
news:11******** *************@v 23g2000prn.goog legroups.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.guar d.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.c om

"Diogene Laerzio" <diogene.laer.. .@gmail.comwrot e in message

news:11******** *************@v 23g2000prn.goog legroups.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
1885
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 importantly, in Windows Explorer, you can drag the treeview's right edge to resize it to your will. How can I do this with my treeview (at runtime obviously)? Do I need to use a splitter? Any info would be appreciated very much.
5
6674
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. Here is what I've tried so far: 1. Turning off CS_VREDRAW and CS_HREDRAW in both the parent form and a subclass of the control via the "override CreateParams" property (these values were already off). 2. Setting various styles and handling...
1
5216
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 splitter with a TreeView and I do not get the flickering with it. I created a new Form based Windows app. Added a TreeView (dock left), then a splitter and a property grid on the right (dock fill). For this test, I added a panel and button at the...
5
3916
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) but only sometimes. Other times it appears behind the parent form and all that is visible is the last few characters of that row. Anyone know what might be causing this and how I can fix it? Thanks.
0
901
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 get it to display the scrollbars when I resize my screen? I want to see those scrollbars also when I resize my screen so that I don't see the entire treeview.
3
5341
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 automatically resize (horizontally of course) to show all the content. by default, if something does not fit in the client area, the treeview control adds scrollbars. What I want to do is let the user "auto-expand" the treeview to the point where the...
1
2504
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 the left side cell. How can I have a scrollbar when the treeview expands beyond the bottom of the page? I don't want the scrollbar for the entire page, just the treeview content placeholder.
6
2646
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 also docked to the parent, and the container at this poit enlarges and covers up the toolstripmenu. If I don't dock them then they don't resize when the form/container gets resize by the user. I have a toolcontianer with menustrip and toolstrip. ...
1
2121
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
9647
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10100
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7509
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.