473,614 Members | 2,335 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Treeview control help

fgh
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.

I'm using C# by the way, but I doubt that'll make much of a difference.
Thank you for the information. Good bye.
Jul 21 '05 #1
5 1880
fgh
And another question:

Saying I have a Form in VS.NET. I add a treeview and listview left and right
respectively, and at the top. At the bottom, I add a panel. WHen I run it,
if I resize the form or maximise, I want the controls to expand their sizes
proportionately . Like they do with almost every application. How can I do
this? BTW I anchored the treeview TOP and LEFT because obviously that's how
I want it. And the listview I ancored RIGHT and TOP as well of course. The
panel just BOTTOM, LEFT AND RIGHT (it covers the whole area). When I resize
the app while running, I want the components to resize proportionately .

I hope this is clear.

Thanks for any help.

"fgh" <ed@ed.com> wrote in message
news:eI******** ******@tk2msftn gp13.phx.gbl...
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.

I'm using C# by the way, but I doubt that'll make much of a difference.
Thank you for the information. Good bye.

Jul 21 '05 #2
Hi fgh,

Based on my understanding, you want to use TreeView and ListView to make a
windows explorer like Form.
=============== =============== =============== ===
Normally, you may first add a TreeView to the form, whose Dock property is
set as Left, then you may drag a Splitter control on the form, it will
automaticly dock to the right of TreeView. At last, you may drag a ListView
control to the form, make its Dock property to Fill, then it will fill the
left right aera of the form.

For more information about making a windows explorer like Form, please
refer to the below:
http://www.thecodeproject.com/csharp/tv-lv-basic41.asp
http://www.c-sharpcorner.com/Code/20...inExplorer.asp
http://www.c-sharpcorner.com/winform...inexplorer.asp

=============== =============== ==========
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3
fgh
That's correct, thank you for the settings, they work perfectly. Thanks
again.

""Jeffrey Tan[MSFT]"" <v-*****@online.mi crosoft.com> wrote in message
news:jk******** *****@cpmsftngx a06.phx.gbl...
Hi fgh,

Based on my understanding, you want to use TreeView and ListView to make a
windows explorer like Form.
=============== =============== =============== ===
Normally, you may first add a TreeView to the form, whose Dock property is
set as Left, then you may drag a Splitter control on the form, it will
automaticly dock to the right of TreeView. At last, you may drag a
ListView
control to the form, make its Dock property to Fill, then it will fill the
left right aera of the form.

For more information about making a windows explorer like Form, please
refer to the below:
http://www.thecodeproject.com/csharp/tv-lv-basic41.asp
http://www.c-sharpcorner.com/Code/20...inExplorer.asp
http://www.c-sharpcorner.com/winform...inexplorer.asp

=============== =============== ==========
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #4
Hi fgh,

Thanks very much for your feedback.
I am glad I can help, if you need further help, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #5
Hi fgh,

Thanks very much for your feedback.
I am glad I can help, if you need further help, please feel free to tell me.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #6

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

Similar topics

5
19882
by: SoKool | last post by:
Can anyone point me to a site where I can get a free treeview control to use in ASP .NET or any tutorial that can help me build my own treeview control. I intend to use a treeview to generate a dynamic menu by collating data from a Sql Server Table. Many thanks.
4
14173
by: Ben Coats | last post by:
Hey, I'm trying to find code for an Explorer-style Directory ComboBox. (You know, it display "Desktop", "My Computer", all drives, etc., but it has a treeview control inside the combobox so that you can navigate through the file system as well.) I've found some on the web, but all of them just have the drives and desktop directories and are static in that you cannot expand the directories. I normally build a treeview control to do it with,...
3
3817
by: christof | last post by:
I've got a really easy problem, please help me: There are two pages in one I'm creating a TreeView like that: TreeView dbTree = new TreeView(); TreeNode dbTreeRoot = new TreeNode("Root"); dbTree.Nodes.Add(dbTreeRoot); .. ..
10
2347
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a top border. Is it possible to have more than 1 style at the same level (parent node) when using a SiteMap? I want it to appear something like this and I can only find a way to either have the border on all root nodes or none at all. In...
0
2474
by: apenly | last post by:
Hi all- I'm trying to Render a TreeView in a custom control, but I'm receiving a NullReferenceException at runtime. If I put the TreeView on the page it works fine, but as soon as I try to render it within my control it crashes and burns. I've even tried placing it within another control (a PlaceHolder) and tried to render the PlaceHolder to no avail. Any ideas on how to fix this problem? Here's my code:
2
1569
by: rolf.oltmans | last post by:
Hello all, I need to place treeview control in Grid control. I need to place it in a grid because I need to show calendar against every node. Is placing a treeview in grid possible? If I need to create my own control that would include capabilities of both treeview and Grid what would I have to do? Being new to asp.net I guess I've to make a control that would inherit from treeview and grid. But would changes I've to make in my...
0
1983
by: noneya22 | last post by:
I want to use a TreeView control as a one-level, vertical navigation menu. I'm using this control currently with a SiteMapDataSource and .sitemap file. I've written code that associates an image with each TreeView node based upon a custom attribute I have included in the siteMapNode nodes of my .sitemap file. This all works as desired, including the security trimming which is especially desired behavior. The nodes of the TreeView...
0
12781
by: jiing | last post by:
Hi all, I want to use sting(the same as Node.Text) to judge if a node exists in TreeView. I've tried several ways, but seems all failed. could anybody help me? Thanks in advance. //My TreeView is defined to has depth =3 only.
2
5492
by: makennedy | last post by:
Hi Experts, Please help, I am a newbie to ASP.NET 2.0 may be I am doing something wrong or there may be a bug somewhere. Basically I have a TreeView Control which I have created programmatically. And I want to bind the selection of a TreeNode (which is a record) from the database) to a DetailsView which shows the datatable record for the selected TreeView node in the Details View. I am using IDE : Visual Web Developer 2005 Express; OS=...
0
1708
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= | last post by:
I have a treeview, which is in an accordion, which is in an updatepanel. When I click on a node in the treeview, it loads up a control as it should. When I click on the same node again, the previously loaded control disappears and does not get reloaded. I am not sure how this is happening. Can someone tell me why this is happening and show me how to stop the control from being unloaded. HTML and event for the treeview: <asp:UpdatePanel...
0
8197
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...
0
8142
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8443
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...
0
7114
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6093
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
5548
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
4136
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2573
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.