This is a migrated thread and some comments may be shown as answers.

Suggestion

5 Answers 76 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
KMBah
Top achievements
Rank 1
KMBah asked on 13 Jul 2007, 07:23 PM
I suggest adding something to the RadTreeView that allows for getting which mouse button is being pressed on individual nodes. Maybe adding Button to the RadTreeViewEventArgs that returns a MouseButtons value.

For what I'm doing it won't make a huge difference, but it would help to know in certain circumstances.

5 Answers, 1 is accepted

Sort by
0
Dimitar Kapitanov
Telerik team
answered on 16 Jul 2007, 01:32 PM
Hi KMBah,
We will provide the original mouse arguments as a property of the RadTreeViewEventArgs, for all mouse events exposed on the treeview level (NodeMouseDown, NodeMouseUp, etc.). It will be available for Q2 release in September. If you have any other ideas on how to improve the treeview API, please share them with us.

Kind regards,
Dimitar Kapitanov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
pierre-jean
Top achievements
Rank 1
Veteran
Iron
answered on 11 Jul 2020, 02:11 PM

Hello

I see the original mouse arguments on the RadTreeViewMouseEventArgs (with NodeMouseDown, NodeMouseUp events)

But I don't see the original mouse arguments on the RadTreeViewEventArgs of the NodeMouseClick Event ?

Am I missing something ?

How can I get the mouse button (left or right) on a nodeMouseClick event ?

Thanks

Pierre-Jean

0
Nadya | Tech Support Engineer
Telerik team
answered on 15 Jul 2020, 10:39 AM

Hello, Pierre-Jean,

Yes, you are right. Currently, the NodeMouseClick event does not offer the original mouse arguments as in NodeMouseDown and NodeMouseUp events. I found it a reasonable request this is why I have logged it in our feedback portal by creating a new public thread. You can track its progress, subscribe for status changes, and add your comments on the following link - feedback item.

I have also updated your Telerik Points for the report.

Currently, due to the specifics of the issue, you can use the NodeMouseDown and NodeMouseUp events.

Should you have other questions please let me know.

Regards,
Nadya
Progress Telerik

0
pierre-jean
Top achievements
Rank 1
Veteran
Iron
answered on 17 Jul 2020, 03:59 PM

 

Hello Nadya

Thanks a lot for your message,

For various reasons I have to handle the nodemouseclick event, therefore I have solved the issue in saving the mousebutton clicked in the nodemousedown event and then use it in the nodemouseclick, as below.

This works fine for me
Thanks for updating my points

Best Regards

----------------------------------------------------------------------------------------------------------------------

Private MouseOriginalEventArgs As MouseButtons
Private Sub tvShow_NodeMouseClick(sender As Object, e As RadTreeViewEventArgs) Handles tvShow.NodeMouseClick

        If MouseOriginalEventArgs = MouseButtons.Left Then cMain.LoadShowtvNode(e.Node)
End Sub
Private Sub tvShow_NodeMouseDown(sender As Object, e As RadTreeViewMouseEventArgs) Handles tvShow.NodeMouseDown
        MouseOriginalEventArgs = e.OriginalEventArgs.Button
        addCtxMenu(e.Node)
End Sub

0
Nadya | Tech Support Engineer
Telerik team
answered on 20 Jul 2020, 08:34 AM

Hello, Pierre-Jean,

I am glad that you managed to find a working solution for your scenario. Storing MouseOriginalEventArgs is also a possible approach. Thank you for sharing it.

I would like to note that the issue is in the development stage now (as you can see from the feedback item's status) so a fix will be introduced soon in one of our next LIB. Stay tuned!

Do not hesitate to contact me if you have other questions.

Regards,
Nadya
Progress Telerik

Tags
Treeview
Asked by
KMBah
Top achievements
Rank 1
Answers by
Dimitar Kapitanov
Telerik team
pierre-jean
Top achievements
Rank 1
Veteran
Iron
Nadya | Tech Support Engineer
Telerik team
Share this question
or