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.

As in create button pad statement:

Create ButtonPad { title_string | ID pad_num } As
        button_definition [ button_definition ... ] 
    [ Title title_string ]
    [ Width w ]
    [ Position ( x, y ) [ Units unit_name ] ]
    [ ToolbarPosition ( row, column ) ]
    [ { Show | Hide } ] 
    [ { Fixed | Float } ]

And In create button

{ PushButton | ToggleButton | ToolButton }
    Calling { procedure | menu_code | OLE methodname | DDE server, topic }
    [ ID button_id ]
    [ Icon n [ File file_spec ] ]
    [ Cursor n [ File file_spec ] ]
    [ DrawMode dm_code ] 
    [ HelpMsg msg ]
    [ ModifierKeys { On | Off } ] 
    [ Enable ] [ Disable ]
    [ Check ] [ Uncheck ]

As for my question the default button may already have ID so how would we know that ID is unique.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

If you want to see what IDs MapInfo assigns to menus, buttonpads and buttons, open the file MENU.def up in a text editor (Notepad is fine, I use Notepad++). The file is installed to the following location:

C:\Program Files\MapInfo\MapBasic (assuming you installed MapBasic in the default location).

This will give you all of the IDs of the menu commands and buttons that MapInfo uses.

share|improve this answer
    
There actually is a good point to your question. Default menu items/buttons do not have any specific ID, but you cna always get to them thru their handle (the ID they are calling). However other applications might use the same ID as you do. So here there is a chance for conflict. But that also let's you call features in other applications - as long as you know their ID. –  Peter Horsbøll Møller Aug 26 '11 at 10:32

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.