PDA

View Full Version : balloon close button



srinirocks
08-03-2009, 12:52 PM
i used the following technique to avoid the user to move the pushpins and shapes.

http://www.mapforums.com/making-pushpin-locations-immoveable-1612.html

But now my pushpin balloon's close button doesnt work. Can somebody tell me a workaround for it?


Srini

Wilfried
08-04-2009, 08:13 AM
Hi,

An easy workaround could be to display a popup menu with the close option when a user right click on the pushpin

srinirocks
08-05-2009, 01:16 PM
Thank you for your reply Wilfried. But the default right click menu(hide all information) is working fine. What I am looking for is some way to set the balloonstate to GeoBalloonState.geoDisplayNone when the user clicks on the x button? I don't think it is possible in this case as there is no way to know that user has clicked the x button.

Wilfried
08-07-2009, 07:19 AM
Hi,

I have an idea. What you do now is when a pushpin is selected is unselect it (bij creating / selecting / deleting some other object).

The let the mouse button do his job (to close the balloon) you can do the unselect a little later, outside an event handler of the control. You can do this by posting a message to a custom message handler (or you can use a timer also but it is overkill for what it has to do).