Page 1 of 1 1
Topic Options
#86842 - 2002-07-14 06:32 PM Kixforms general questions.
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
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

Top
#86843 - 2002-07-14 06:38 PM Re: Kixforms general questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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?
_________________________
!

download KiXnet

Top
#86844 - 2002-07-14 06:54 PM Re: Kixforms general questions.
Bryce Offline
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
#86845 - 2002-07-14 07:00 PM Re: Kixforms general questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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...
_________________________
!

download KiXnet

Top
#86846 - 2002-07-14 07:07 PM Re: Kixforms general questions.
Shawn Administrator Offline
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 Offline
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.... [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

Top
#86848 - 2002-07-14 07:14 PM Re: Kixforms general questions.
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
*mumbles something about undocumented features*...

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

Shawn! you are the MAN! thanks dude!

Top
#86849 - 2002-07-14 07:18 PM Re: Kixforms general questions.
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I thought that it's not possible as not found on doc and didn't even search inside the dll-itself!
_________________________
!

download KiXnet

Top
#86850 - 2002-07-14 08:23 PM Re: Kixforms general questions.
Shawn Administrator Offline
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 ... [Wink]
Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.057 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org