Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to check un check togglebutton but I don't know how to alter using mapbasic. Is there any command to alter it? I could not find it in MapInfo user guide. I have command:

Alter Button

But how to use I don't know how to provide Id to buttons?

share|improve this question
Is it a custom button that you have made or one of the MapInfo ones? – Nathan W Jul 5 '11 at 1:04
Yes @Nathan I have made costum button – kinkajou Jul 5 '11 at 1:27
up vote 3 down vote accepted

You first need to add a ID to your custom button when you create it:

Create ButtonPad "Utils" As 
        HelpMsg "Choose this button to display query dialog" 
        Calling button_sub_proc 
        ID 5000 '' This is the ID for the button

Then you can alter the button using:

Alter Button ID 5000

You can also do:

Alter Button button_sub_proc

button_sub_proc is the method that the button calls.

Although using the method way, if you have more then one button calling that method they all get updated.

share|improve this answer

Alter Button ID xx Uncheck

Good luck

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.