![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Wed, Dec 6 2017 7:39 PM | Permanent Link |
KimHJ Comca Systems, Inc | I have a Map with several location markers, since this app runs on a phone/tablet I can not display the title since it only works on mouse hover.
There is an OnClick event for TMapLocation, but I can not find a way to retrieve the index of the location. In the OnClick Event of the Location I tried this but that gives an error : i := Map1.Locations.Index; ShowMessage(Map1.Locations[i].Title); Thanks, Kim |
Thu, Dec 7 2017 12:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Kim,
<< There is an OnClick event for TMapLocation, but I can not find a way to retrieve the index of the location. In the OnClick Event of the Location I tried this but that gives an error : i := Map1.Locations.Index; ShowMessage(Map1.Locations[i].Title); >> From the TMapLocation.OnClick event handler, just use the Sender parameter: ShowMessage(TMapLocation(Sender).Title); Also, yes, there is an Index property, but it's in the TMapLocation class, not the TMapLocations class (where you're trying to access it). The TMapLocations class doesn't have any concept of a "current index". Tim Young Elevate Software www.elevatesoft.com |
Thu, Dec 7 2017 4:04 PM | Permanent Link |
KimHJ Comca Systems, Inc | Tim Young [Elevate Software] wrote:
>>From the TMapLocation.OnClick event handler, just use the Sender parameter: ShowMessage(TMapLocation(Sender).Title); Also, yes, there is an Index property, but it's in the TMapLocation class, not the TMapLocations class (where you're trying to access it). The TMapLocations class doesn't have any concept of a "current index". << Thanks, I was trying Sender As and that didn't work. Kim |
Fri, Dec 8 2017 2:45 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Kim,
<< I was trying Sender As and that didn't work. >> I'll see about working that in to the compiler. I originally left it out because it simply involves a wrapper function around an "is" test followed by a direct cast, and I was trying to keep the amount of "translated" code to a minimum (for easier debugging in the browser). Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Friday, December 1, 2023 at 06:01 PM | Privacy Policy![]() © 2023 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |