Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Line object
Message
From
11/03/1999 05:16:50
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
10/03/1999 15:37:33
Roberto Sanhueza
Fundes Consultoria Internacional
Santiago, Chile
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00196063
Message ID:
00196261
Views:
28
>how can create an object like line object, but without rectangular area around it ?(the events must activate only over the visible line, not over the rectangular area) How can i do this.. ? all containers and objects are rectangular in VFP? any idea ? Thanx.
Yes line object has a rectangular area but fortunately calculation is possible :
* ie:mousemove event
LPARAMETERS nButton, nShift, nXCoord, nYCoord
lnThreshHold = 1 && Accepted range in pixels
lnThisTop = objtoclient(this,1)
lnThisLeft = objtoclient(this,2)
lnDeltaX = nXcoord -  lnThisLeft
lnDeltaY = iif(this.lineSlant = "\", ;
          nYcoord -  lnThisTop, ;
          this.height - nYcoord +  lnThisTop)
lnOnLine = this.height / this.width * lnDeltaX && Exact point on line
llOnLine = ( abs(lnOnline - lnDeltaY) <= lnThreshHold ) && within limits
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform