|
|
|||||||
I am trying to add a right click menu. How can you tell which button was clicked? When I test for a click, I loose which button was clicked. Thanks |
||||||||
|
|
|||||||
Hi krabourn, Try using the OnMouseDown event in combination with the Form's MouseButton property - heres an example. Just right click anywhere on the form. Dont forget - the MouseX and MouseY position is in Client Coordinates (relative to the top left of the form, not the desktop) and Forms are specified using real coordinates (from the top left of the desktop) ... code:Break On [ 18. December 2002, 02:07: Message edited by: Shawn ] |
||||||||
|
|
|||||||
Head slap! I was using .OnMouseUp instead of .OnMouseDown. Thanks |
||||||||
|
|
|||||||
Can you make this work with .ListView in future releases? Of course we will probably be asking for this in other object too. I will have to wait. I am not sure how I would translate a pixel location to a row in the .ListView. My current code. code:$lvwNames.OnMouseDown = 'fnlvwNamesMouseRight_Down()' |
||||||||
|
|
|||||||
I'll have a play with your code here but what neat things are you trying to accomplish - you wanting to position a tooltip-type thingy over a particular row - or a popup menu over a row ? |
||||||||
|
|
|||||||
I think that'll maybe just the same like setting process priorities in Task Manager ? |
||||||||
|
|
|||||||
Was just playing with krabourns code there - notice that if you have a single column listview, and you right click just to the right side of a row (to the the right of the column) then the click gets through - for clicking inside a row will have to expose some special handling for that - these are trapped by the ListView itself and Ill just filter it back out through the MouseX/MouseY/Button interface. |
||||||||
|
|
|||||||
This is more playing at the moment. I have simple database front end that accesess a .ini file, at the moment. This that keeps track of computers I control. Info such as computer name, computer domain, IP, User ID, User Name and User Phone. I thought it would be cool to add a right click popup menu. It would do the same things that the menu buttons do. I don't have a web page to show you what it looks like. |
||||||||
|
|
|||||||
Have you been successfull in getting the form to popup over the MouseX/MouseY coordinates ? Like I eluded to earlier, there are some tricks to converting relative client coordinates to physical screen coordinates for properly positioning a popup form. |
||||||||
|
|
|||||||
OK, what is the trick. I was thinking $Form.Left + $Form.MouseX $Form.Top + $Form.MouseY |
||||||||
|
|
|||||||
Nevermind I stransposed the variables in the popup function. |
||||||||
|
|
|||||||
eh? have never tried those functions (time to do it?) but I think shawn, your question will be answered |
||||||||
|
|
|||||||
I guess I did not actually answer the question. YES. |
||||||||
|
|
|||||||
ee? kra, did I understand your last post at all? not! so, do you have that code or not? |
||||||||
|
|
|||||||
Sorry, I am sick at home today and my brain is not firing on all two cylinders. Here is the code. It is not even close to perfect. It is just some proof of concept. code:Break On |
||||||||
|
|
|||||||
so, sorry, is the consept to have the popup at the ... mm.. so, do we want the popup left/top under the mouse, or do we want it centered around the mouse? I quess this could shoot a msgbox() udf... |
||||||||
|
|
|||||||
btw, will use this code at checker so if you find any strugle, I'd like to know... |
||||||||
|
|
|||||||
Krabourn: Sweet ! Jooel: Sweet ! -Shawn |
||||||||
|
|
|||||||
This makes it start at the mouse. Why do I need to add these numbers? code:$FormS.Top = $FormSTop + 30 |
||||||||
|
|
|||||||
? one reason is the border calculation of board |
||||||||
|
|
|||||||
I used my wonderful Yahoo account and set myself up an account with GeoCities. Here is a screenshot. Pretend there is a normal windows border around it. Boy it looks ugly through a browser. http://www.geocities.com/krabourn@sbcglobal.net/ [ 18. December 2002, 20:20: Message edited by: krabourn ] |
||||||||
|
|
|||||||
eh? |
||||||||
|
|
|||||||
Push. I never noticed before that edits did not show up in bbChecker. |
||||||||
|
|
|||||||
edits? |
||||||||
|
|
|||||||
You know. The Edit/Delete Button. I am running 1.6.1.1. =================== Testing an edit. [ 18. December 2002, 20:46: Message edited by: krabourn ] |
||||||||
|
|
|||||||
eh, do they show up in today's actives either? checker does not do wonders you know ... well, small ones, but. |
||||||||
|
|
|||||||
Not sure. This subject is in Today's with edits. |