ORexx IDC_Tree Right-Click 
Author Message
 ORexx IDC_Tree Right-Click

Hi!!

Is there any possibility to know which item in a IDC_Tree was
right-clicked??? I have no idea!!!

Thanks

--
www.MainFrameForum.com - USENET Gateway



Tue, 07 Dec 2004 04:15:41 GMT  
 ORexx IDC_Tree Right-Click


Quote:
> Hi!!

> Is there any possibility to know which item in a IDC_Tree was
> right-clicked??? I have no idea!!!

> Thanks

> --
> www.MainFrameForum.com - USENET Gateway

I didn't find a way with a list unless a row was selected before
right-clicking.
This way it worked:

   curList = self~GetListControl(<ListID>)
      item = curlist~selected
      if item = -1 then return

So I assume the following will work with a tree:

curTree = self~GetTreeControl(IDC_Tree)
   item = curTree~selected
   if item = -1 then return



Tue, 07 Dec 2004 04:46:01 GMT  
 ORexx IDC_Tree Right-Click
Hi MrPugh,

it's not possible to get which item is right clicked.
With self~ConnectCommonNotify("IDC_TREE","RCLICK", "On_RCLICK") you can
check if right clicked on the tree control.
Then you can get the selected item (unfortunately the clicked one)

--
Kind regards,

Stefan D?rsam

REXX and Office Solutions, IBM Germany
Lotus Notes: Stefan Doersam/Germany/IBM

Quote:

> Hi!!

> Is there any possibility to know which item in a IDC_Tree was
> right-clicked??? I have no idea!!!

> Thanks

> --
> www.MainFrameForum.com - USENET Gateway



Tue, 07 Dec 2004 17:57:17 GMT  
 ORexx IDC_Tree Right-Click
I mean:  (unfortunately NOT the clicked one)

--
Kind regards,

Stefan D?rsam

REXX and Office Solutions, IBM Germany
Lotus Notes: Stefan Doersam/Germany/IBM

Quote:

> Hi MrPugh,

> it's not possible to get which item is right clicked.
> With self~ConnectCommonNotify("IDC_TREE","RCLICK", "On_RCLICK") you can
> check if right clicked on the tree control.
> Then you can get the selected item (unfortunately the clicked one)

> --
> Kind regards,

> Stefan D?rsam

> REXX and Office Solutions, IBM Germany
> Lotus Notes: Stefan Doersam/Germany/IBM


> > Hi!!

> > Is there any possibility to know which item in a IDC_Tree was
> > right-clicked??? I have no idea!!!

> > Thanks

> > --
> > www.MainFrameForum.com - USENET Gateway



Tue, 07 Dec 2004 20:25:07 GMT  
 ORexx IDC_Tree Right-Click
I found a way:

Just get the Item under the mouse!!! When curTree is the TreeView:

/* mouse-position to x y*/ parse value self~CursorPos with x y /* get
tree-position to cx cy*/ parse value curTree~getPos with cx cy /* this
is the complete position of the mouse over the treeview */ x = x - (cx *
curTree~FactorX) y = y - (cy * curTree~FactorY) /* call HitTest to get
the item */ item = curTree~HitTest(x,y)

If there is a substring "ONITEM" in item, the mouse is over this item.

Thanks to all answers!!! :-)

--
Posted via dBforums
http://dbforums.com



Sat, 18 Dec 2004 14:36:20 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. IDC_Tree in ORexx

2. (wxPython) Double left clicking and right clicking with ListBoxes

3. Unexpected right-click behavior in a tree view

4. right-mouse click event in a textfield

5. Right click mouse problems

6. VA 3.0a for Win95 (right button click)

7. Right-Click in a SpriteSurface?

8. Right click on wheel mouse problem

9. Browse and right click

10. Right click and buttons

11. Disable Right Mouse Click

12. Mouse Right Click Problem

 

 
Powered by phpBB® Forum Software