Hi all,
I half-resolved my previous TreeView issue. Now I was wondering if anyone
knows of a way to keep a TreeNode from being highlighted when it is
left-clicked? It seems like there should be an event I could intercept, or
a property I could set, but I'll be darned if I can figure out which one...
Thanks,
Michael C., MCDBA 7 2085
You can hook on "BeforeSelect" event and set the Cancel property on
TreeViewCancelEventArgs to true.
-vJ
"Michael C" <mi*******@optonline.net> wrote in message
news:eK**************@TK2MSFTNGP12.phx.gbl... Hi all,
I half-resolved my previous TreeView issue. Now I was wondering if anyone knows of a way to keep a TreeNode from being highlighted when it is left-clicked? It seems like there should be an event I could intercept, or a property I could set, but I'll be darned if I can figure out which one...
Thanks, Michael C., MCDBA
Tried that, it didn't work :(
Thanks,
Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:en**************@TK2MSFTNGP15.phx.gbl... You can hook on "BeforeSelect" event and set the Cancel property on TreeViewCancelEventArgs to true.
-vJ
"Michael C" <mi*******@optonline.net> wrote in message news:eK**************@TK2MSFTNGP12.phx.gbl... Hi all,
I half-resolved my previous TreeView issue. Now I was wondering if
anyone knows of a way to keep a TreeNode from being highlighted when it is left-clicked? It seems like there should be an event I could intercept, or a property I could set, but I'll be darned if I can figure out which one...
Thanks, Michael C., MCDBA
I *think* it doesn't work because right-clicking a node doesn't fire the
BeforeSelect and AfterSelect events (maybe because right-clicking doesn't
actually select a node?) I just tried it again, just to make sure, and it
appears right-clicking doesn't fire BeforeSelect.
Thanks,
Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:en**************@TK2MSFTNGP15.phx.gbl... You can hook on "BeforeSelect" event and set the Cancel property on TreeViewCancelEventArgs to true.
-vJ
"Michael C" <mi*******@optonline.net> wrote in message news:eK**************@TK2MSFTNGP12.phx.gbl... Hi all,
I half-resolved my previous TreeView issue. Now I was wondering if
anyone knows of a way to keep a TreeNode from being highlighted when it is left-clicked? It seems like there should be an event I could intercept, or a property I could set, but I'll be darned if I can figure out which one...
Thanks, Michael C., MCDBA
Right-clicking does fire the BeforeSelect event on mine. I'm using .Net
1.1.
-vJ
"Michael C" <mi******@nospam.org> wrote in message
news:cj*********************@news4.srv.hcvlny.cv.n et... I *think* it doesn't work because right-clicking a node doesn't fire the BeforeSelect and AfterSelect events (maybe because right-clicking doesn't actually select a node?) I just tried it again, just to make sure, and it appears right-clicking doesn't fire BeforeSelect.
Thanks, Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message news:en**************@TK2MSFTNGP15.phx.gbl... You can hook on "BeforeSelect" event and set the Cancel property on TreeViewCancelEventArgs to true.
-vJ
"Michael C" <mi*******@optonline.net> wrote in message news:eK**************@TK2MSFTNGP12.phx.gbl... > Hi all, > > I half-resolved my previous TreeView issue. Now I was wondering if anyone > knows of a way to keep a TreeNode from being highlighted when it is > left-clicked? It seems like there should be an event I could > intercept, > or > a property I could set, but I'll be darned if I can figure out which > one... > > Thanks, > Michael C., MCDBA > >
I'm using .NET 1.1 also, VS.NET 2003 -- I wired up the BeforeSelect event
and the MouseDown events, and the right-click just isn't firing the
BeforeSelect here... hmmm... I can probably live without that part, it's
just a little annoying is all. Now I'm having an issue with trying to
display a pop-up Context Menu on the right-click. It pops up OK, but until
you click somewhere else on the form to get rid of the Context Menu, you
can't right-click again... I'd like to figure out how to make the Context
Menu close out and pop back up as soon as you right-click anywhere on the
form, whether the menu is up or not... Guess I need to look at ContextMenu
events next.
Geez, everytime I figure out one thing, I have to look up 3 others.
Thanks,
Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:Ou*************@TK2MSFTNGP12.phx.gbl... Right-clicking does fire the BeforeSelect event on mine. I'm using .Net 1.1.
-vJ
"Michael C" <mi******@nospam.org> wrote in message news:cj*********************@news4.srv.hcvlny.cv.n et...I *think* it doesn't work because right-clicking a node doesn't fire the BeforeSelect and AfterSelect events (maybe because right-clicking
doesn't actually select a node?) I just tried it again, just to make sure, and
it appears right-clicking doesn't fire BeforeSelect.
Thanks, Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message news:en**************@TK2MSFTNGP15.phx.gbl... You can hook on "BeforeSelect" event and set the Cancel property on TreeViewCancelEventArgs to true.
-vJ
"Michael C" <mi*******@optonline.net> wrote in message news:eK**************@TK2MSFTNGP12.phx.gbl... > Hi all, > > I half-resolved my previous TreeView issue. Now I was wondering if anyone > knows of a way to keep a TreeNode from being highlighted when it is > left-clicked? It seems like there should be an event I could > intercept, > or > a property I could set, but I'll be darned if I can figure out which > one... > > Thanks, > Michael C., MCDBA > >
Context menu should work as it is, unless you're handling the Mouse Down
events in a specific way and that is interfering with the other events.
That could also explain why I get the BeforeSelect and you don't.
-vJ
"Michael C" <mi******@nospam.org> wrote in message
news:gQ*********************@news4.srv.hcvlny.cv.n et... I'm using .NET 1.1 also, VS.NET 2003 -- I wired up the BeforeSelect event and the MouseDown events, and the right-click just isn't firing the BeforeSelect here... hmmm... I can probably live without that part, it's just a little annoying is all. Now I'm having an issue with trying to display a pop-up Context Menu on the right-click. It pops up OK, but until you click somewhere else on the form to get rid of the Context Menu, you can't right-click again... I'd like to figure out how to make the Context Menu close out and pop back up as soon as you right-click anywhere on the form, whether the menu is up or not... Guess I need to look at ContextMenu events next.
Geez, everytime I figure out one thing, I have to look up 3 others.
Thanks, Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message news:Ou*************@TK2MSFTNGP12.phx.gbl... Right-clicking does fire the BeforeSelect event on mine. I'm using .Net 1.1.
-vJ
"Michael C" <mi******@nospam.org> wrote in message news:cj*********************@news4.srv.hcvlny.cv.n et... >I *think* it doesn't work because right-clicking a node doesn't fire the > BeforeSelect and AfterSelect events (maybe because right-clicking doesn't > actually select a node?) I just tried it again, just to make sure, and it > appears right-clicking doesn't fire BeforeSelect. > > Thanks, > Michael C., MCDBA > > "Vijaye Raji" <no*************@hotmail.com> wrote in message > news:en**************@TK2MSFTNGP15.phx.gbl... >> You can hook on "BeforeSelect" event and set the Cancel property on >> TreeViewCancelEventArgs to true. >> >> -vJ >> >> "Michael C" <mi*******@optonline.net> wrote in message >> news:eK**************@TK2MSFTNGP12.phx.gbl... >> > Hi all, >> > >> > I half-resolved my previous TreeView issue. Now I was wondering if > anyone >> > knows of a way to keep a TreeNode from being highlighted when it is >> > left-clicked? It seems like there should be an event I could >> > intercept, >> > or >> > a property I could set, but I'll be darned if I can figure out which >> > one... >> > >> > Thanks, >> > Michael C., MCDBA >> > >> > >> >> > >
By golly you're probably right... I am intercepting the MouseDown event,
although I'm not doing anything I would think would interfere with the other
events... I even tried calling the base.OnMouseDown(e) event in my own
MouseDown event handler, but it still seems to be interfering... strange...
I think I found a workaround, basically using the ContextMenu PopUp event to
handle everything; stranger and stranger. It seems like a simple thing I
want to do, but it gets more and more complicated as I go.
Thanks,
Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message
news:Oz**************@TK2MSFTNGP15.phx.gbl... Context menu should work as it is, unless you're handling the Mouse Down events in a specific way and that is interfering with the other events.
That could also explain why I get the BeforeSelect and you don't.
-vJ
"Michael C" <mi******@nospam.org> wrote in message news:gQ*********************@news4.srv.hcvlny.cv.n et... I'm using .NET 1.1 also, VS.NET 2003 -- I wired up the BeforeSelect
event and the MouseDown events, and the right-click just isn't firing the BeforeSelect here... hmmm... I can probably live without that part,
it's just a little annoying is all. Now I'm having an issue with trying to display a pop-up Context Menu on the right-click. It pops up OK, but until you click somewhere else on the form to get rid of the Context Menu, you can't right-click again... I'd like to figure out how to make the
Context Menu close out and pop back up as soon as you right-click anywhere on
the form, whether the menu is up or not... Guess I need to look at ContextMenu events next.
Geez, everytime I figure out one thing, I have to look up 3 others.
Thanks, Michael C., MCDBA
"Vijaye Raji" <no*************@hotmail.com> wrote in message news:Ou*************@TK2MSFTNGP12.phx.gbl... Right-clicking does fire the BeforeSelect event on mine. I'm using
..Net 1.1.
-vJ
"Michael C" <mi******@nospam.org> wrote in message news:cj*********************@news4.srv.hcvlny.cv.n et... >I *think* it doesn't work because right-clicking a node doesn't fire
the > BeforeSelect and AfterSelect events (maybe because right-clicking doesn't > actually select a node?) I just tried it again, just to make sure,
and it > appears right-clicking doesn't fire BeforeSelect. > > Thanks, > Michael C., MCDBA > > "Vijaye Raji" <no*************@hotmail.com> wrote in message > news:en**************@TK2MSFTNGP15.phx.gbl... >> You can hook on "BeforeSelect" event and set the Cancel property on >> TreeViewCancelEventArgs to true. >> >> -vJ >> >> "Michael C" <mi*******@optonline.net> wrote in message >> news:eK**************@TK2MSFTNGP12.phx.gbl... >> > Hi all, >> > >> > I half-resolved my previous TreeView issue. Now I was wondering
if > anyone >> > knows of a way to keep a TreeNode from being highlighted when it
is >> > left-clicked? It seems like there should be an event I could >> > intercept, >> > or >> > a property I could set, but I'll be darned if I can figure out
which >> > one... >> > >> > Thanks, >> > Michael C., MCDBA >> > >> > >> >> > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vibor |
last post by:
Hello,
I have XML file that looks likes this:
<?xml version="1.0" encoding="utf-8" ?>
<prezentacije>
<datoteka naziv="Koherentni valovi"...
|
by: Peter |
last post by:
Hello,
We are inserting a side menu to our application using a class that is
writing HTML on all our pages. This is a part of the code as an
example:
writer.Write(" <table WIDTH=""100%""...
|
by: Martin |
last post by:
I have a treeview control, which is docked on a panel. When I call the
procedure to fill this treeview from the load event it works fine. It loads
all nodes, and displays them nicely.
However,...
|
by: PeteCresswell |
last post by:
I've just added a new record to the backend DB and reloaded the
TreeView that shows the user all records in the DB.
Now I want to programatically position the TreeView at the newly-added
record...
|
by: Victor Rodriguez |
last post by:
Is there a way that I can have a client side event like
oncontextmenu="showfunction();" on each node?
thanks,
Victor
| |
by: Matt MacDonald |
last post by:
Hi All,
I have a form that displays hierarchical categories in a treeview. Ok so
far so good. What I was to do is have users be able to select a node in the
treeview as part of filling out the...
|
by: drop |
last post by:
Hi,
I'm currently working with the Treeview control in ASP .Net 2.0. The
tree is filled dynamically based on data contained in a MySQL Database.
Here is the exact behavior I want :
1 - User...
|
by: aaronh64 |
last post by:
I'm trying to bind to the ASP.NET TreeView control and utilize the
PopulateOnDemand functionality. However, I am receiving the following
(very confusing) error: "PopulateOnDemand only supported...
|
by: Jenifer.Austin |
last post by:
MS Access 2000
I have created a large treeview control based on lists of parts. The
nodekey for a part consists of a character followed by the parent
part's index. Some of these parts (e.g.,...
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |