forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

%pm question

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Mar 09, 2015 3:36 pm    Post subject: %pm question Reply with quote

I'm wondering if this is possible.

I'd like to allow a popup menu to appear, using the right click. And, since the operations in the menu will be context sensitive, I need to know the location within the window that the user right-clicked.

I am using a Text Array, and have tried the CLEARWIN_INFO@ strings for reading the mouse state and position for Text Array, and have tried the Graphics Window strings as well. But no mouse click was sensed.

I suspect that the Mouse has already been read and cleared by the invocation of the popup menu.

I am able to intercept the left mouse click state and position of the mouse cursor just fine.

I'm thinking I may have to implement my own Window creation similar to the popup menu, then process the user selection from that window, bypassing the popup menu capability entirely.

Would appreciate suggestions and comments!
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Mon Mar 09, 2015 5:06 pm    Post subject: Reply with quote

The ClearWin+ way to create a context sensitive %pm is to use %nw as described in the document cwplus.enh item 341.

Use %lc immediately after the relevant control to get hwnd for the control.
Use this value of hwnd in a %sc callback function (cbfunc say).
In cbfunc write

i = winio@("%nw&",hwnd)
i = winio@("%pm.....

and construct %pm in the usual way.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Mon Mar 09, 2015 5:22 pm    Post subject: Reply with quote

Thanks very much, Paul! I'll give it a go!
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1217
Location: Morrison, CO, USA

PostPosted: Wed Mar 11, 2015 4:03 pm    Post subject: Reply with quote

Paul, it would appear that because the only control in the window is my text_array, this will not work. I can't specify a %nw for each clickable field in the text array. The right-click works (generally) just fine, and I'll use that based on the last user selected field. For the expanded features, I'll have to implement a different solution.

Still, a nice feature that I may be able to use in the new solution.

Thanks for supplying this. I'd have never discovered that on my own!
Bill
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group