#86842 - 2002-07-14 06:32 PM
Kixforms general questions.
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
Since I really could not find a right place to ask these questions...
Shawn, is it possible to return the current mouse X and Y position?
I am using .label to display information, I would like to be able capture where a click event was done.
Bryce
|
Top
|
|
|
|
#86844 - 2002-07-14 06:54 PM
Re: Kixforms general questions.
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
yes, I got a label
$hg_displayPilot = $gui.label("",434,40,105,335)
that can have up to 23 different items (at a time) listed in it.
I got page up and down buttons to the left that controls what is displayed in this label (well they control what are displayed in 4 different labels).
If you would like to see the code
You can find the current project here
|
Top
|
|
|
|
#86846 - 2002-07-14 07:07 PM
Re: Kixforms general questions.
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Sure can Bryce, here's some code for that. It's a Form with two labels. The first label reports the current XY of the mouse, on the Form. The second label is bigger, and reports the current XY of the mouse, within itself.
code:
Break On $Form = CreateObject("Kixtart.Form") $Form.Caption = "Kixforms..." $Form.Width =230 $Form.Height = 270 $Form.BackColor = &669900 $Form.OnMouseMove = "Form_MouseMove" $FormXY = $Form.Label("Form movement...",40,20,140,20) $FormXY.BackColor = &099CC99 $Label = $Form.Label("Label movement...",40,50,140,80) $Label.BackColor = &099CC99 $Label.OnMouseMove = "Label_MouseMove" $Form.Center $Form.Show While $Form.Visible $=Execute($Form.DoEvents(1)) Sleep(0.1) Loop Exit 1 Function Form_MouseMove() $FormXY.Caption = "Form: x=" + $Form.MouseX + " y=" + $Form.MouseY EndFunction Function Label_MouseMove() $Label.Caption = "Label: x=" + $Label.MouseX + " y=" + $Label.MouseY EndFunction
-Shawn [ 14 July 2002, 19:10: Message edited by: Shawn ]
|
Top
|
|
|
|
#86847 - 2002-07-14 07:10 PM
Re: Kixforms general questions.
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
well...
I have thought about going to a grid of..23x4 for display information.... but i feel ill at the thought of having to create that many .label boxes.... So i went the easy way out, 4 label boxes and build a report for each using a string variable and @crlf pulling the information from a global array
What I am wanting to do is if a pilot name is double clicked, the web page for that pilot is launched. That would be easy to do... If I had the current mouse location
Bryce
|
Top
|
|
|
|
#86850 - 2002-07-14 08:23 PM
Re: Kixforms general questions.
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Sorry guys, the documentation is quickly loosing ground to the implementation ... I'm going to have to play "catch-up" in about two weeks time ... best thing to do in the meantime is to just ask on the board, or send an email, or like Jooel said, use Steve's COM Browser ...
|
Top
|
|
|
|
Moderator: Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|