View Full Version : balloon close button

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


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


08-04-2009, 07:13 AM

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

08-05-2009, 12: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.

08-07-2009, 06:19 AM

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).