MapInfo Pro Developers User Group

 View Only
  • 1.  Interface modification with mapbasic

    Posted 16 days ago
    1_ The "Explorer" space can be reduced, and adapted to the number of data tables that are loaded, and another 20 additional ones that can be opened.
    
    2.- In the upper band the work environment is named as "Untitled.wor -MapInfo Pro", change if possible to another name such as "EIELMap.wor - MapInfo Pro"




    Thanks


    ------------------------------
    Mayca González Pérez
    COMUNIDAD. AUT. REG MURCIA
    ------------------------------


  • 2.  RE: Interface modification with mapbasic

    Employee
    Posted 16 days ago

    Hi Mayca

    Explorer Window

    I haven't tried controlling the size of the elements in the Explorer window myself through MapBasic.

    I think what you need to look into is the Docking Manager. There are more details about this in the MapInfo Pro Extensibility Reference Help System. You can find this help file in your MapBasic installation folder and in the Help dropdown in SQL Window.

    I have only so far played with the tab groups for arranging document window. The example below expect one window and will create a new window in a new horizontal tab group.

    Include "IMapInfoPro.def"
    Include "Enums.def"
    Include "MapBasic.def"
    
    Declare Sub Main
    
    Sub Main
    
    Dim	theMapInfoPro As This
    Dim	thsDockingManager As This
    Dim	thsWindow As This
    Dim	rptWindow As RefPtr
    
    	'Get MIPro interface
    	theMapInfoPro		= SystemInfo(SYS_INFO_IMAPINFOAPPLICATION)
    	thsDockingManager	= GetDockingManager(theMapInfoPro)
    	Print "thsDockingManager: " & thsDockingManager
    
    	Map From TableInfo(1, TAB_INFO_NAME)
    
    	thsWindow = GetDockingManagerFrontDocumentWindow(thsDockingManager)
    	rptWindow = thsWindow
    	rptWindow = GetWinInfoWindowId(thsWindow)
    	Print "rptWindow: " & rptWindow
    	Print "FrontWindow(): " & FrontWindow()
    
    	Call DockingManagerCreateTabGroup(thsDockingManager, thsWindow, Orient_Horizontal)
    
    '	Call SetDockingManagerProperty (thsDockingManager, thsWindow, "State", "Dock")
    '	Call SetDockingManagerProperty (thsDockingManager, thsWindow, "DesiredWidthInDockedMode", "1000")
    
    '	Note "Now changing width to 2000"
    '	Call SetDockingManagerProperty (thsDockingManager, thsWindow, "DesiredWidthInDockedMode", "2000")
    
    '	Note "Now locking the window from being closed"
    	Call SetDockingManagerProperty (thsDockingManager, thsWindow, "CanClose", "False")
    
    End Sub

    The size of the elements in the Explorer window can also be saved across sessions. You can enable/disable this through the (Workspace) Explorer preferences.

    I'm not sure how helpful the above is to your specific question

    MapInfo Pro Window Title

    The title of the MapInfo Pro window is typically controlled by the active workspace. If you save your work into a workspace, the name of the workspace will appear in the window title.

    You can also apply a custom name rising the Set Window statement:

    Set Window 1011 Title "Peters GIS"

    The Window ID 1011 refers to the MapInfo Pro Application window.



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------



  • 3.  RE: Interface modification with mapbasic

    Posted 16 days ago

    Ok. Thanks



    ------------------------------
    Mayca González Pérez
    COMUNIDAD. AUT. REG MURCIA
    ------------------------------