Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dang it!
Message
 
 
To
22/08/2005 13:38:06
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01042650
Message ID:
01042699
Views:
18
>In order for any object in VFP to have a visible presence in the GUI it must be a form or contained object in either a form or _screen.
>
>So Borislav's answer is one way to get it there. Hilmar's won't work though.
>
>>Okay, what have I done wrong with this? The little poop won't display for me.
>>
>>
>>Define Class marker As Shape OF _base
>> Height = 25
>> Width = 25
>> Curvature = 90
>> BackColor = 255
>> BackStyle = 0
>>Enddefine
>>
>>marker.show
>>
>
>______________
>
>No luck so far. This my first attempt to build a class this way and use it. Here is the situation.
>
>I have a form. In the form is an image of a map. When a mouse click occurs on the map I want to place a shape on the map where the click occurs.
>
>I have the class defined in a prg which runs once on the startup of the app.
>
>Prg code
>
>
>
>Define Class marker As Shape OF _base
>	Height = 25
>	Width = 25
>	Curvature = 90
>	BackColor = 255
>	BackStyle = 0
>Enddefine
>
>
>
>I put two lines of code under the click
>
>click code
>
>
>
>Thisform.AddObject("marker", "Marker")
>Thisform.marker.Visible = .t.
>
>
>
>What have I done wrong?
>
>Thanks for your patience

Where do you set left ant top properties of your marker? Also use NewObject method and add a third parameter with the name of prg file where you put your class definition. Or make sure your program is in SET('PROCEDURE')

BTW, why did you define it in a program? Do you read a discussion here about advantages of prg based classes? < g >
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform