473,473 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

making treenodes readonly

Hi, I am adding nodes to a treeview and I wish for the text property of these
nodes
to be readonly. Intellisense doesn't seem to offer this property, Is it
possible to set a node to read only or failing that the whole tree.

Dim MyNode As New DirectoryNode(strProjectCode, strProjectKey, 12)
MyNode.Key = CType(ProjList(i).ProjectID, Integer)
'i need to set MyNode to readonly
node.Nodes.Add(MyNode)
Thanx in Advance

Geri
Nov 21 '05 #1
3 2613
Geraldine,

I don't know about setting individual nodes to read-only but I have just
tried a TreeView and it is read-only by default. The only way I could find to
allow nodes to be modified was to set LabelEdit = True. May be check what
your LabelEdit is set to.

Chris.

"Geraldine Hobley" wrote:
Hi, I am adding nodes to a treeview and I wish for the text property of these
nodes
to be readonly. Intellisense doesn't seem to offer this property, Is it
possible to set a node to read only or failing that the whole tree.

Dim MyNode As New DirectoryNode(strProjectCode, strProjectKey, 12)
MyNode.Key = CType(ProjList(i).ProjectID, Integer)
'i need to set MyNode to readonly
node.Nodes.Add(MyNode)
Thanx in Advance

Geri

Nov 21 '05 #2
"Geraldine Hobley" <Ge*************@discussions.microsoft.com> schrieb:
I am adding nodes to a treeview and I wish for the text property of these
nodes to be readonly.


You can make all nodes read-only by setting their 'LabelEdit' property to
'False'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Errata:
You can make all nodes read-only by setting their 'LabelEdit' property to
'False'.


.... should read "... by setting the treeview control's 'LabelEdit'
property...".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #4

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

Similar topics

0
by: Saurabh Mishra | last post by:
I need to be able to make the entire PropertyGrid ReadOnly at times during runtime, and I am not exactly sure how to accomplish this. Making the PropertyGrid.Enabled = false is unacceptable since...
0
by: Norbert Heidbüchel | last post by:
Hi all, I have read a lot of postings and web pages about drag and drop and treeviews, but could not find an answer to my problem. Sorry, if I missed something. I am trying to drag and drop...
8
by: pmud | last post by:
Hi, I have 2 questions: 1. I have an editable data grid with 21 columns. I need to edit only 2 cloumns in this data grid. But when the grid is displayed in Edit mode, all the columns show long...
2
by: Daren Hawes | last post by:
Hi I need to add an attribute to a Textbox to make it read only. To add a CSS I use DeptDate.Attributes("Class") = "textInput" That adds 'Class="textinput"', but the readonly is like..
1
by: nate axtell | last post by:
In VB .Net I made a custom CheckBox column style (for the Datagrid control) that maps to two DataTable columns , one it uses for the Checked status and the other it uses for the Enabled status. I am...
1
by: Tricia Colwell via DotNetMonster.com | last post by:
Here is what i have: I have a datagrid with two columns one is a combo box style and the other is a textbox style. If the combo box is "Between" or "Like" i want that the next cell to be...
10
by: DrPete | last post by:
Hi People Could anyone suggest to me the best way to distinguish treenodes? By this I mean I'm in a situation where I have a TreeNode that displays a number of categories and within those nodes...
5
by: Andy B | last post by:
I have 2 TextBoxes and an Add button on a page. When the user fills in the TextBoxes, the values are added to a dataset table. When the page gets done reloading, the TextBoxes are turned into...
2
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
My first time using a TreeView: I've got a TreeView that I populated with some data and it has nodes. In the Properties window, I created an Event Handler for the TreeView's AfterSelect...
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:
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...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.