MapInfo Pro

Expand all | Collapse all

Question about Create ButtonPad n the 64-bit version of MapInfo Pro

  • 1.  Question about Create ButtonPad n the 64-bit version of MapInfo Pro

    Posted 02-11-2019 01:48
    Edited by Evgeny Kleiman 02-11-2019 05:19
    According to MapBasic Reference Guide concerning statement Create ButtonPad
    "In MapInfo Pro 64-bit, this command creates a new group in the LEGACY tab"
    Also it has option Float. It seems that there is contradiction between these 2 properties. I created buttons under Legacy tab and I do not see possibility to move it. So may be Create ButtonPad  Float option "Not suppported in the 64-bit version of MapInfo Pro"?

    ------------------------------
    Evgeny Kleiman
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: Question about Create ButtonPad n the 64-bit version of MapInfo Pro

    Pitney Bowes
    Posted 02-11-2019 14:16
    Correct, Float is no longer applicable in x64 versions. There is certainly more places in our docs where we need to remove or split off x64 and Win32 relevant documentation.  Sorry about that.
    In release notes and docs for MapBasic 17.01 you may have found the following section which has some additional changes to Create and Alter ButtonPad statement.

    Add and remove buttons to any Pro ribbon tab using Create or Alter ButtonPad statements
    For MapInfoPro x64 this is the relevant syntax in bold being changed.
    Other syntax for Create ButtonPad and Alter ButtonPad is ignored when using the Ribbon Interface.

    Create ButtonPad { title_string } As
    button_definition [ button_definition ... ]
    [ Title title_string ]
    [ Tab tab_name | tab_caption ]
    [ { Show | Hide } ]

    button_definition

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

    icon_code can now use Uri syntax for the File token
    e.g.:
    icon -1 file "pack://application:,,,/MapInfo.StyleResources;component/Images/Mapping/openTable_16x16.png"

    Alter ButtonPad { current_title }
    [ Add button_definition [ button_definition ... ] ]
    [ Remove { handler_num | ID button_id } [ , ... ] ]
    [ Title new_title ]
    [ Tab tab_name | tab_caption ]
    [ { Show | Hide } ]
    [ Destroy ]

    button_definition

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

    Icon Code can now use Uri syntax for the File token
    e.g.:
    icon -1 file "pack://application:,,,/MapInfo.StyleResources;component/Images/Mapping/openTable_16x16.png"


    Syntax changes:

    Added the "tab" keyword to Create and Alter ButtonPad MapBasic statements

    if altering an existing Ribbon Tab, the tab name is the programmatic name of the tab (e.g.: "TabMap"), not the Ribbon Tab caption.

    NOTE: To get the NAMES of existing Ribbon controls, build and run the ProSampleAddin provided with MapBasic and use its Dump Object Model tool.

    (\MapBasic\Samples\RIBBONINTERFACE\DotNet\ProSampleAddIn)

    If creating a New Tab you can specify both the Tab Name and its Caption by separating them with the pipe symbol; (e.g.: "MyNewTab | MyNewCaption"

    Added [Small | ExtraSmall | Large] tokens to button_definition clause for Icons

    Added ability to use Uri syntax to specify button icon using file token

    Users can now create new tabs or tab groups on existing ribbon tabs

    Users can also add buttons to existing tab groups (Previously 'Legacy' Tab was automatically assumed).

    When altering a ButtonPad to remove a button, users must specify the Name of the Tab where ButtonPad exists in order to remove it.

    Example:

    alter buttonpad "MapFile" add pushbutton calling HelloRibbon Small icon 46 Title "Hello" helpmsg "help on hello" Tab "TabMap"

    Example:

    Alter ButtonPad "PushButtons" Add PushButton small

    icon -1 file "pack://application:,,,/MapInfo.StyleResources;component/Images/Mapping/openTable_16x16.png"

    HelpMsg "\nUriIcon"
    ID 4
    Calling button1_handler
    Title "Using Uri"
    Tab "PushButtonTab"
    Show

    Create ButtonPad <BPad> As Default

    Syntax requires adding the Tab Name to reset custom buttonpad

    e.g.: Create ButtonPad "PushButtons" as Default Tab "PushButtonTab"

    Regards,
    -Bill


    ------------------------------
    Bill Wemple
    Principal QA Engineer
    Pitney Bowes
    Troy, NY
    ------------------------------