Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

2 Answers

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 
    PushButton 
        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
add comment

Alter Button ID xx Uncheck

Good luck

share|improve this answer
add comment

Your Answer

 
discard

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.