Bryce
(KiX Supporter)
2002-07-14 06:32 PM
Kixforms general questions.

Since I really could not find a right place to ask these questions... [Big Grin]

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


LonkeroAdministrator
(KiX Master Guru)
2002-07-14 06:38 PM
Re: Kixforms general questions.

missed that one before too.
then decided to use onclick.
do you mean you have a label which has clickable areas which you want to devide?


Bryce
(KiX Supporter)
2002-07-14 06:54 PM
Re: Kixforms general questions.

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


LonkeroAdministrator
(KiX Master Guru)
2002-07-14 07:00 PM
Re: Kixforms general questions.

you must be ill...

looks... wow!
my codes seems childrens play when saw that.

if there would be less stuff it could be gone around by using multiple labels and then controlled which ones are visible at the same time...


ShawnAdministrator
(KiX Supporter)
2002-07-14 07:07 PM
Re: Kixforms general questions.

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 ]


Bryce
(KiX Supporter)
2002-07-14 07:10 PM
Re: Kixforms general questions.

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.... [Eek!] 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 [Smile]

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 [Smile]

Bryce


Bryce
(KiX Supporter)
2002-07-14 07:14 PM
Re: Kixforms general questions.

*mumbles something about undocumented features*...

Did i say how COOL! this thing is!!!!!!

Shawn! you are the MAN! thanks dude!


LonkeroAdministrator
(KiX Master Guru)
2002-07-14 07:18 PM
Re: Kixforms general questions.

I thought that it's not possible as not found on doc and didn't even search inside the dll-itself!

ShawnAdministrator
(KiX Supporter)
2002-07-14 08:23 PM
Re: Kixforms general questions.

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 ... [Wink]