Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

TreeView in vb.net

Posted on 2004-04-13
5
Medium Priority
?
1,389 Views
Last Modified: 2012-04-10
I am building client / server app, and trying to use the treeview.
I want vertical scroll bar but not horizontal scrollbar.

The only property for the treeview I see is "Scrollable"

How do I make it scroll only vertically, not horizontally.

Currently, it is giving me a horizontal scroll bar, even though the length of the text in the tree does not warrant a horizontal scrollbar.
It is not giving me a vertical scrollbar, because the vertical scroll bar is not necessary with the amount I have stored in the tree.  It should behave the same for horizontal scrollbar, but it doesn't.  I.e.  if you can fit everything for each node horizontally, then don't show me the horizontal scroll bar!....  How do I make it bahave this way?
0
Comment
Question by:kamleshmistry
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 10826477
Are you using Windows XP?  How and when are the nodes created?

Bob
0
 

Author Comment

by:kamleshmistry
ID: 10865406
Yes, I am using windows xp.
Nodes are created design time, but some some nodes are also created run time....
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 520 total points
ID: 10867957
There is a little bug with the tree view and Windows XP where you can't load the nodes at design time, you need to put some code in the Form_Load event to fix that.

Bob
0
 

Author Comment

by:kamleshmistry
ID: 10970150
I have not tried bob's suggestion, but I do not wan to keep this question open forever...
Will go ahead and reward the points...but I have not yet confirmed....
0
 

Expert Comment

by:captainreda
ID: 37830094
In VB.NET VS2008 treeview scrollbar doesnot show either specifically if the treeview contains all the nodes.
The length of the treeview versus the screen width doesnot seems to be taken into account.
So what I did was to compute a treeview length and reduce it by a small value, as a result the vertical scroll bar was displayed.

TreeView.Height = (17 * (TreeView.Nodes.Count - 10))
Regards
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question