473,395 Members | 1,815 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,395 software developers and data experts.

Help w/ TreeView and Images

Hello,

I'm tyring to understand something about using a TreeView ctrl & assigning
the images. For testing purposes I'm just using the VS IDE to create and
assign the contents of the TreeView. When I add a Node I can set the Image,
and or the Selected Image properties for that node. Normally, when a user
interacts with a TreeView (assume the directory style folders), the icon is
a closed folder when collapsed, and when selected. However, it becomes an
open folder image when the user actually opens the node by clicking on the
"+". Doesn't this require a 3rd image to be assigned? How can I get this
same type of behavior when there's only 2 settings? What am I missing here?

TIA,

--
John C. Bowman
Software Engineer
Thermo Electron Scientific Instruments Div.
<Remove this before reply> jo*********@thermo.com
Nov 15 '05 #1
2 2662
Hello,

You can extend the TreeView control's functionality programatically.
E.g., if you want to use the 3d image for the expanded nodes you could do
something like that:
- handle the AfterExpand event and change the TreeNode's ImageIndex
property to your 3d image
- handle the AfterCollapse event and change the TreeNode's ImageIndex back
to the default image


Hello,

I'm tyring to understand something about using a TreeView ctrl & assigning
the images. For testing purposes I'm just using the VS IDE to create and
assign the contents of the TreeView. When I add a Node I can set the Image,
and or the Selected Image properties for that node. Normally, when a user
interacts with a TreeView (assume the directory style folders), the icon is
a closed folder when collapsed, and when selected. However, it becomes an
open folder image when the user actually opens the node by clicking on the
"+". Doesn't this require a 3rd image to be assigned? How can I get this
same type of behavior when there's only 2 settings? What am I missing here?

TIA,

--
John C. Bowman
Software Engineer
Thermo Electron Scientific Instruments Div.
<Remove this before reply> jo*********@thermo.com


Regards,

Adrian Vinca [MSFT], Developer Division
--------------------------------------------------------------------
This reply is provided "AS IS", without warranty (express or implied).

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 15 '05 #2
Adrian,

Thanks for the idea. I'll give it a try and see what happens.

John

"Adrian Vinca [MSFT]" <ad**********@online.microsoft.com> wrote in message
news:oW**************@cpmsftngxa07.phx.gbl...
Hello,

You can extend the TreeView control's functionality programatically.
E.g., if you want to use the 3d image for the expanded nodes you could do
something like that:
- handle the AfterExpand event and change the TreeNode's ImageIndex
property to your 3d image
- handle the AfterCollapse event and change the TreeNode's ImageIndex back
to the default image


Hello,

I'm tyring to understand something about using a TreeView ctrl & assigningthe images. For testing purposes I'm just using the VS IDE to create and
assign the contents of the TreeView. When I add a Node I can set the Image,and or the Selected Image properties for that node. Normally, when a user
interacts with a TreeView (assume the directory style folders), the icon isa closed folder when collapsed, and when selected. However, it becomes an
open folder image when the user actually opens the node by clicking on the"+". Doesn't this require a 3rd image to be assigned? How can I get this
same type of behavior when there's only 2 settings? What am I missing here?
TIA,

--
John C. Bowman
Software Engineer
Thermo Electron Scientific Instruments Div.
<Remove this before reply> jo*********@thermo.com


Regards,

Adrian Vinca [MSFT], Developer Division
--------------------------------------------------------------------
This reply is provided "AS IS", without warranty (express or implied).

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.

Nov 15 '05 #3

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

Similar topics

1
by: Bryan | last post by:
I have a TreeView, with an ImageList. The ImageList's size is set to 20x15, and all of the images it contains are 20x15. When I use it with the TreeView, though, all of the images are scaled to...
3
by: frazer | last post by:
hi i have a set of bitmaps in an array. and i want to add it to a imagelist so that i can show those images in my treeview. imageList2.Images.Add (Image.FromHbitmap (picture.Bitmap)); //cant...
2
by: Jurjen de Groot | last post by:
The IE webControls come with standard graphics for the treeview amongst other things, does anyone know of other sets of images so the treeview doesn't look so much like the Windows Explorer tree...
0
by: muralidharan | last post by:
WebForm1.aspx Code: <%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI" Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView id="TreeView1" Height="520"...
0
by: damiensawyer | last post by:
I have an ASP:Treeview control <asp:TreeView Id="TreeView2" PathSeparator = "|" OnTreeNodePopulate="PopulateNode" ExpandDepth="1" runat="server" cssclass="TreeControl"...
6
by: cyriel1920 | last post by:
Hi, I use the selectednodestyle with a white background so the user can see which item was chosen in the treeview navigation. The nodes have a navigateURL with a target to another frame....
2
by: vincent90152900 | last post by:
Following is my code and I want the Panel1 display beside the TreeView1. I found out the ModalPopupExtender has two property, “X”, and “Y”. So, I wish I could find out the position of a...
0
by: bsturg21 | last post by:
Hello, I have an app that has a custom treeview which inherits the base treeview class and I am having a problem with the way the treeview is being redrawn. Each node in the treeview represents a...
1
by: Jeffrey Walton | last post by:
Hi All, I have an array of 16x16 bitmaps (60 total). I've tried adding the array to the ImageList with the Add method, but the TreeView paints as if no BMP is present. The problem is the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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:
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...
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.