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

Treeview Control: Maintaining Selection Rectangle When Disabled?

Got a TreeView control on the screen.

User clicks a node, screen loads details for that node.

Screen has two modes: Browse and Edit.

If the user clicks "Edit", I set Tree.Enabled=False and make the detail fields
on the screen editable.

Tree.Enabled=False because once the screen is in "Edit" mode for data behind a
certain node, we don't want the user to select some other node.

Problem is that when Tree.Enabled is set to False, the selection rectangle on
the current node disappears - making for some confusion for the user... "Which
thing am I editing?..."

One workaround would be to repeat the currently-selected Node.Text on the screen
over top of the detail section... but that seems a little lame to me.

Conceptually, just locking the Tree instead of setting .Enabled=False would
probably have the desired effect... but there doesn't seem tb a .Locked prop for
the tree.

Anybody been here? Some other property?
--
PeteCresswell
Jul 31 '06 #1
0 1408

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

Similar topics

0
by: hzgt9b | last post by:
Using visual studio .NET 2003, VB: I'm experiencing an issue with a TreeView object when it gets focus - the first root node in the tree always gets selected when the control gets focus - even if...
5
by: (Pete Cresswell) | last post by:
I've got a TreeView on the left of my screen. As the user navigates the tree, I load corresonding detail info into the rest of the screen. Works ok, but when the user clicks on a detail field,...
4
by: | last post by:
Please, help. I created my contol, ButtonX, which subclasses System.Forms.Windows.Button class. I am doing my own paiting, by overriding OnPaint and OnPaintBackground (without calling base...
2
by: casmang | last post by:
I am having the problem where when I change the font of a TreeNode in a TreeView to a bold property, the bounds or rectangle that draws the node does not expand so that the text ends up being cut...
4
by: Andrew Robinson | last post by:
I am using a TreeView to perform navigation and have a few nodes that need to generate a popup menu. For this, I use the SelectedNodeChanged event and then add the relevant "window.open" script to...
3
by: John | last post by:
I have overridden the default DrawNode (OwnerDrawText mode) to allow me to draw an extra icon at the front of the text block, while still using the built-in icon list for another icon. The problem...
2
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...
18
by: =?Utf-8?B?TGkgV2VuZw==?= | last post by:
Hi, Is there a way for TreeView to have multiple selections? But I am not talking about its checked boxes. I want a way similar to ListView with MultiSelect = True. So I can use or key and...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.