User avatar
Posts: 14323
Joined: Wed Aug 04, 2004 10:40 pm
Location: Sweden
Contact: Website

Guide lines for object properties.

Sat Aug 07, 2004 12:07 am

NOTE! The restrictions presented here is for GpsTools 2.11 and earlier!
The restrictions are removed in GpsTools 2.20

This works just fine in GpsTools 2.20
<font face="Courier New">
objIcon.Position.Latitude = 50
</font id="Courier New">

Guide lines for object properties GpsTools 2.11 and earlier.

All properties that set or return objects need to be handled in a specific way. To change the properties of an object returned by an object property. E.g. to change the latitude of and Icon (on a map). You first need to get the Position object from the Icon, then change the latitude, and then reassign the object to the Icon.

This is how to do it:
<font face="Courier New">
Dim objPos As Position
Set objPos = objIcon.Position
objPos.Latitude = 50
Set objIcon.Position = objPos
</font id="Courier New">

Onther way is to create a new object and assign it to the object property. Here is an example of how to set the color of an Rectangle:
<font face="Courier New">
Dim objBrush As Brush

objBrush.Red = 255
objBrush.Green = 0
objBrush.Blue = 0
objBrush.Transparent = False

Set objRect.Brush = objBrush
</font id="Courier New">

And this is the way that does not work: ' DOES NOT WORK!!!!
<font face="Courier New">
objIcon.Position.Latitude = 50
</font id="Courier New">

Return to “Knowledge base GpsTools”