Hi Tiffany
The example above is a stand-alone that need to get compiled.
You can, of course, turn the Ribbons in the floating window completely, if you prefer. You can do this via the
Backstage, the
PRO tab, and then
Application.
Let me know if you could need the functionality in a tool. I could add it to the WindowHelper tool.
------------------------------
Peter Horsbøll Møller
Distinguished Engineer
Pitney Bowes Software & Data
------------------------------
Original Message:
Sent: 03-06-2020 12:30
From: Tiffany Selvidge
Subject: Hiding the ribbon in a floating window
Greetings Peter,
I have also been trying to remove the ribbon from the floating window as the smaller window interferes with printing.
My question is:
Did you create a new file for your script? Or did you add it to an existing mapbasic file that came with the software?
------------------------------
Tiffany Selvidge
Knowledge Community Shared Account
Original Message:
Sent: 08-06-2019 04:05
From: Peter Horsbøll Møller
Subject: Hiding the ribbon in a floating window
I gave this another try and decided to try use the DockingManager to access the window. That was the solution.
Include "IMapInfoPro.def"
Include "Enums.def"
Include "MapBasic.def"
Declare Sub Main
Sub Main
Dim theMapInfoPro As This
Dim thsDockingManager As This
Dim theRibbon As This
Dim thsWindow As This
Dim rptWindow As RefPtr
'Get MIPro interface
theMapInfoPro = SystemInfo(SYS_INFO_IMAPINFOAPPLICATION)
'Get the Docking Manager
thsDockingManager = GetDockingManager(theMapInfoPro)
'Get the FrontWindow via the Docking Manager
thsWindow = GetDockingManagerFrontDocumentWindow(thsDockingManager)
rptWindow = thsWindow
'Get the ribbon from the floating window and then hide it
theRibbon = MIProGetFltingWindowRibbon(theMapInfoPro, rptWindow)
Call SetRbnVisible (theRibbon, false)
End Sub
------------------------------
Peter Horsbøll Møller
Pitney Bowes
Original Message:
Sent: 07-29-2019 04:38
From: Peter Horsbøll Møller
Subject: Hiding the ribbon in a floating window
Hi
I'm trying to hide the ribbon in a floating document window but I'm running into issues getting the ribbon from a floating window.
I get this error:
Here is the code (also attached in a zip) that I use:
Include "IMapInfoPro.def"
Include "IMapInfoPro.def"
Include "Enums.def"
Include "MapBasic.def"
Declare Sub Main
Sub Main
Dim theMapInfoPro As This
Dim theRibbon As This
Dim rptWindow As RefPtr
'Get MIPro interface
theMapInfoPro = SystemInfo(SYS_INFO_IMAPINFOAPPLICATION)
Print "theMapInfoPro: " & theMapInfoPro'
rptWindow = FrontWindow()
Print "rptWindow: " & rptWindow
Print "FrontWindow(): " & FrontWindow()
theRibbon = MIProGetFltingWindowRibbon(theMapInfoPro, rptWindow)
Call SetRbnVisible (theRibbon, false)
End Sub
The error occurs at this statement:
theRibbon = MIProGetFltingWindowRibbon(theMapInfoPro, rptWindow)
Any suggestions on how I can get to the ribbon of a floating window and then hide it would be appreciated.
------------------------------
Peter Horsbøll Møller
Pitney Bowes
------------------------------