[Gambas-user] Ok, I'm stumped
Fabien Bodard
gambas.fr at ...626...
Fri Nov 27 15:38:37 CET 2009
so the answer is :
private $MX as Integer
Private $MY as integer
Public sub gvOption_MouseDown
$MX = mouse.x
$MY=Mouse.Y
END
Public sub gvOption_Menu()
MyForm.Move($Mx, $My)
END
Be carefull as Mouse.X is container relative...
For a form in the whole screen ... use Mouse.ScreenX
etc
In fact mouse.events are (MouseDown, MouseUp, Click, MouseMove)
and Menu was done to have a common Event that react to Menu key and right click
in your case you can use MouseUp instead
but it will not react to the key menu of the keyboard
2009/11/27 Charlie Reinl <Karl.Reinl at ...9...>:
> Am Freitag, den 27.11.2009, 22:20 +1100 schrieb
> nospam.nospam.nospam at ...626...:
>> Charlie Reinl wrote:
>> > Am Freitag, den 27.11.2009, 19:27 +1100 schrieb
>> > nospam.nospam.nospam at ...626...:
>> >> Gambas3
>> >>
>> >> I have a GridView named gvOptions, and this code:
>> >>
>> >> Public Sub gvOptions_Menu()
>> >>
>> >> Debug Mouse.X
>> >> Debug Mouse.Y
>> >>
>> >> End
>> >>
>> >> 1) Both Mouse.X and Mouse.Y tell me "no mouse event data"
>> >>
>> >> I need to capture the mouse position to pop up a window. How do
>> >> I do that in g3?
>> >>
>> >> 2) Where is the main body of documentation for Gambas3?
>> >>
>> >> I will update it as I go on my journey of learning.
>> >>
>> >
>> > Salut nospam,
>> >
>> > http://gambasdoc.org/help
>>
>> Yes, well...
>>
>> http://gambasdoc.org/help/comp/gb.qt/mouse/y?v3
>> STATIC PROPERTY READ Y AS Integer
>> Returns the relative vertical position of the cursor of a mouse event.
>>
>> http://gambasdoc.org/help/comp/gb.qt/mouse/y
>> STATIC PROPERTY READ Y AS Integer
>> Returns the relative vertical position of the cursor of a mouse event.
>>
>> Very helpful, Charlie. Thank you. So, why do both Mouse.X and Mouse.Y tell
>> me "no mouse event data"?
>
> Salut nospam,
>
> why do you need the mouse position ? You have pushed a right mouse
> button on an element who has a Menu event.
> Can you use Mouse.ScreenX / Mouse.ScreenY
>
> --
> Amicalement
> Charlie
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list