To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
VBForums  

VB Wire News
MSDN Subscribers: Download the VS 2010 Release Candidate
MSDN Subscribers: Download the VS 2010 Release Candidate
Sell Your Code and Make Money?
Creating your own Tetris game using VB.NET
Article :: Improving Software Economics, Part 4 of 7: Top 10 Principles of Iterative Software Management



Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier

Reply Post New Thread
 
Thread Tools Search this Thread Display Modes
Old Jun 21st, 2005, 07:19 AM   #1
kishore.kr
Addicted Member
 
Join Date: Jul 04
Location: Mumbai
Posts: 236
kishore.kr  is on a distinguished road (30+)
Hide Treeview Label display ??[CLOSED]

hi guys,

i am using a treeview. in the first set of node i am using alphabets and i am using images for that. in the child nodes i am using both images and texts. so i have to use treeview's style(7) tvwtreelinesplusminuspicturetext.

but in the parent node since i am not using text its giving the labeledit option, it looks odd. i feel it looks better without that. i have attached the image and showed my query in red arrow. can anyone guide me how to hide or not to show the label from the parent..
Attached Images
 
__________________
--Kishore...

Last edited by kishore.kr; Jun 23rd, 2005 at 01:44 AM. Reason: Closing the thread...
kishore.kr is offline   Reply With Quote
Old Jun 21st, 2005, 11:39 AM   #2
brucevde
PowerPoster
 
Join Date: Oct 02
Location: British Columbia
Posts: 9,527
brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)
Re: Hide Treeview Label display ??

The "labeledit option" as you describe is used to indicate which Node has focus. You cannot get rid of it entirely.

You can use this code to remove the highlighting, but the Focus rectangle will still be visible.

VB Code:
  1. Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
  2.         Node.Selected = Not Node.Parent Is Nothing
  3. End Sub

A suggestion: when the Parent node is clicked, expand it and move focus to its first child node.
brucevde is offline   Reply With Quote
Old Jun 22nd, 2005, 01:21 AM   #3
kishore.kr
Addicted Member
 
Join Date: Jul 04
Location: Mumbai
Posts: 236
kishore.kr  is on a distinguished road (30+)
Re: Hide Treeview Label display ??

hi brucevde,

thanks for the code and suggesstion. but the code doesn't work as i want. actually i want to remove the focus rectangle. and for the suggesstion, i have did that already, but the problem is when all the nodes are collapsed then it will be at the parent node only(as in the picture in my first post..).

anyhow thanks again, if you find any other solution then please do tell me.
__________________
--Kishore...
kishore.kr is offline   Reply With Quote
Old Jun 22nd, 2005, 01:25 AM   #4
kishore.kr
Addicted Member
 
Join Date: Jul 04
Location: Mumbai
Posts: 236
kishore.kr  is on a distinguished road (30+)
Re: Hide Treeview Label display ??

hi again,

actually for the parent node i could have kept the text itself. but in the child node i have to add images. so the parent nodes image space is left blank. if any one can suggest how to remove the image space then that will also do for me.(actually that is why i went to images for the alphabets..) thank you..
__________________
--Kishore...
kishore.kr is offline   Reply With Quote
Old Jun 22nd, 2005, 11:10 AM   #5
brucevde
PowerPoster
 
Join Date: Oct 02
Location: British Columbia
Posts: 9,527
brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)brucevde has much to be proud of (1500+)
Re: Hide Treeview Label display ??

You can't. The style for each Node is the same and if the style includes an image, space is reserved for that image.
brucevde is offline   Reply With Quote
Old Jun 23rd, 2005, 01:36 AM   #6
kishore.kr
Addicted Member
 
Join Date: Jul 04
Location: Mumbai
Posts: 236
kishore.kr  is on a distinguished road (30+)
Re: Hide Treeview Label display ??[CLOSED]

hi,

thanks for providing the information. i have to change my treeview according to how it works .. thanks again for your time ..
__________________
--Kishore...
kishore.kr is offline   Reply With Quote
Reply

Go Back   VBForums > Visual Basic > Visual Basic 6 and Earlier


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 02:01 PM.




To view more projects, click here

Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.