TreeView and right mouse button

Discuss GUI programming with the RapaGUI plugin here
Post Reply
User avatar
msu
Posts: 57
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

TreeView and right mouse button

Post by msu » Sun May 17, 2020 6:36 pm

Hi,
just got a problem with the TreeView widget.
I want to activate an entry by right-clicking (right mouse button).
Is that possible?

greetings
msu

SamuraiCrow
Posts: 274
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: TreeView and right mouse button

Post by SamuraiCrow » Tue May 19, 2020 5:56 pm

If it is not possible to right-click without triggering a menu in your OS then no. RapaGUI gadgets are native widgets in the host operating system.
I'm on registered MorphOS using FlowStudio.

User avatar
msu
Posts: 57
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: TreeView and right mouse button

Post by msu » Wed May 20, 2020 4:57 pm

If I right-click an entry in the TreeView widget, an event is surely triggered?
Does RapaGUI send a message in this case?

SamuraiCrow
Posts: 274
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: TreeView and right mouse button

Post by SamuraiCrow » Wed May 20, 2020 5:07 pm

If the event is generated it is processed before it even gets to Hollywood, I think. The edit function on listview items is a double left-click. Maybe that will work also for the tree gadget. Maybe my memory is wrong but it might be consistant with that.
I'm on registered MorphOS using FlowStudio.

User avatar
msu
Posts: 57
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: TreeView and right mouse button

Post by msu » Wed May 20, 2020 6:59 pm

SamuraiCrow wrote:
Wed May 20, 2020 5:07 pm
If the event is generated it is processed before it even gets to Hollywood, I think. The edit function on listview items is a double left-click. Maybe that will work also for the tree gadget. Maybe my memory is wrong but it might be consistant with that.
Yes, exactly. A double left click can be processed with the TreeView widget without errors.

My plan now a little more precisely:
1. Right mouse button over a TreeView entry opens a context menu
2. Use various functions such as renaming or moving.

User avatar
airsoftsoftwair
Posts: 3445
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: TreeView and right mouse button

Post by airsoftsoftwair » Thu May 21, 2020 12:03 pm

msu wrote:
Wed May 20, 2020 4:57 pm
If I right-click an entry in the TreeView widget, an event is surely triggered?
Does RapaGUI send a message in this case?
Yes, but it is tied to context menus. You can attach a context menu to a treeview widget by setting Area.ContextMenu for it but it's impossible to do anything else when RMB is clicked. The only thing that can be done on RMB is to have the context menu pop up.

User avatar
msu
Posts: 57
Joined: Mon Jun 13, 2016 11:36 am
Location: Sinzig/Germany

Re: TreeView and right mouse button

Post by msu » Thu May 21, 2020 1:37 pm

Okay, then I have to rethink my concept.
In Windows programs, it is actually standard that when I right-click on a TreeView entry, it automatically becomes the active entry.
In RapaGUI, an entry is only activated (highlighted) by clicking the right mouse button as long as the right mouse button remains pressed. When I release the mouse button, the original active entry is highlighted again.
This could quickly lead to confusion.

User avatar
airsoftsoftwair
Posts: 3445
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: TreeView and right mouse button

Post by airsoftsoftwair » Thu May 21, 2020 10:10 pm

Now I see what you mean. When I right-click an entry in the Demo example that comes with RapaGUI it briefly selects that entry and then jumps back to the previously active entry. This indeed looks like a bug to me.

Post Reply