Is there a way to SHOW the OUTPUT WINDOW without CLEARING the OUTPUT WINDOW?
All --
I would like to be able to SHOW the OUTPUT WINDOW without CLEARING the OUTPUT WINDOW.
Right now it looks like if I CLOSE/HIDE the OUTPUT WINDOW and then SHOW the OUTPUT WINDOW (either through a MACRO or MANUALLY) a CLEAR is run on the OUTPUT WINDOW.
I have tried using
Any suggestions?
Thanks.
-- Matt
I would like to be able to SHOW the OUTPUT WINDOW without CLEARING the OUTPUT WINDOW.
Right now it looks like if I CLOSE/HIDE the OUTPUT WINDOW and then SHOW the OUTPUT WINDOW (either through a MACRO or MANUALLY) a CLEAR is run on the OUTPUT WINDOW.
I have tried using
ThisApplication.Output.Visible = FALSEbut the CLEAR still seems to happen.
ThisApplication.Output.Visible = TRUE
Any suggestions?
Thanks.
-- Matt
0
Best Answer
-
Matt, the Output panel gets disposed then closed and recreated again then open. This workaround will keep the instance of the Output panel alive during Show/Hide/Show cycle preserving its context:
Public _output As System.Windows.Forms.Control = Nothing Public Sub OutputShow If McApplication.ThisApplication.Panels.Control("Output") Is Nothing Then If _output Is Nothing Then McApplication.ThisApplication.Panels.Add("MediaCy.Controls.Output.Output", "Output", "Output", mcPanelLocation.mcplBottom, Nothing, mcControlType.mcctUserControl, Nothing, Nothing, Nothing, mcPanelsOptions.mcpoDoNotDispose) Else McApplication.ThisApplication.Panels.Add(_output, "Output", "Output", mcPanelLocation.mcplBottom, Nothing, mcControlType.mcctUserControl, Nothing, Nothing, Nothing, mcPanelsOptions.mcpoDoNotDispose) End If End If End Sub Public Sub OutputHide If McApplication.ThisApplication.Panels.Control("Output") IsNot Nothing Then _output = McApplication.ThisApplication.Panels.Control("Output")'keep ref McApplication.ThisApplication.Panels.Remove("Output") End If End Sub
Let me know, if you need more robust solution,
Thanks,
Nikita.
0
Answers
-
Matt,
You can use the following code.Sub HideOutput ThisApplication.Panels.SetAutoHide("Output",True) End Sub Sub ShowOutput ThisApplication.Panels.SetAutoHide("Output",False) End Sub
Pierre0 -
Pierre --
Thank you for your response.
Your solution did not work for me until I made a slight revision.ThisApplication.Panels.SetAutoHide("Output",False)
did not work until I had manually or programmatically executed aThisApplication.Output.show
Here is the CODE that works for me . . . .Private Sub checkBox_ShowOutputWindow_CheckedChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles checkBox_ShowOutputWindow.CheckedChanged 'If the SHOW OUTPUT WINDOW OPTION is ON If ( checkBox_ShowOutputWindow.checked = True ) _ Then 'Show the output window ThisApplication.Output.show ThisApplication.Panels.SetAutoHide("Output",False) Else 'Hide the output window ' ThisApplication.Output.hide ThisApplication.Panels.SetAutoHide("Output",True) End If End Sub
When I have a section of code needs to show something to the user in the OUTPUT WINDOW, I paste in . . .'-- Extract and report the measurement information for the current image 'Clear the output window ThisApplication.Output.Clear 'If the SHOW OUTPUT WINDOW OPTION is OFF If ( checkBox_ShowOutputWindow.Checked = False ) _ Then 'Turn on the SHOW OUTPUT WINDOW OPTION checkBox_ShowOutputWindow.Checked = True ' 'Show the output window ' ThisApplication.Output.show End If
If the user UNCHECKS the and then CHECKS the SHOW OUTPUT WINDOW OPTION, the window disappears then reappears with its contents intact.
This is exactly the functionality that my code needs.
The only issue that I see is the
AUTOMATE RIBBON + TASK SECTION + OUTPUT PANEL
is displaying ENGAGED (with the GOLD BACKGROUND) while the OUTPUT WINDOW is hidden by theThisApplication.Panels.SetAutoHide("Output",True)
Thank you very much.
-- Matt
0 -
Pierre --
Yesterday I neglected to mark this DISCUSSION / QUESTION with a
ANSWERED = YES
Today I'm back to note that there seems to be another WRINKLE.
When your solution and my modification are used on a PREMIER that has a DOCKED OUTPUT WINDOW, everything works fine.
When the same code is run on a PREMIER that has an UNDOCKED OUTPUT WINDOW, the SHOW and HIDE behavior is dramatically different.
On my machine, the HIDE TRUE generated a PINNED version of the OUTPUT WINDOW to the left of the APPLICATION DIALOG BOX and it did not close the ORIGINAL OUTPUT WINDOW. The HIDE FALSE seems to discard the PINNED version of the OUTPUT WINDOW and relocates the UNDOCKED OUTPUT WINDOW into the UPPER LEFT CORNER of my PRIMARY WINDOWS SCREEN (no matter where PREMIER is).
DOCKING the OUTPUT WINDOW is the only way I see to resolve this problem and to have the ability to SHOW and HIDE the OUTPUT WINDOW without losing its contents.
Are there any other options?
Thanks.
-- Matt
0 -
No I think that's what you need to do, SetAutoHide is only valid when the output window is visible.
Pierre0 -
Pierre --
Ouch.
Is there any other way to do a PRESERVE on the contents of the OUTPUT WINDOW during the HIDE / SHOW CYCLE?
Thanks.
-- Matt
0 -
Hi Matt,My first thought was what it should keep it context, but it is not. I’ll take a look how to keep the context of the Output panel during hide/show cycle and will post the solution.Nikita.0
-
Nikita --
I appreciate your investigating this.
-- Matt
0 -
Nikita --
Thank you for your response.
I have modified my code with'Declare the PUBLIC VARIABLE that will hold the OUTPUT WINDOW CONTENTS while it is HIDDEN Public _output As System.Windows.Forms.Control = Nothing
In the PUBLIC CLASS section of the APPLICATION'S VB CODE andPrivate Sub checkBox_ShowOutputWindow_CheckedChanged _ (ByVal sender As System.Object,ByVal e As System.EventArgs) _ Handles checkBox_ShowOutputWindow.CheckedChanged 'If the SHOW OUTPUT WINDOW OPTION is ON If ( checkBox_ShowOutputWindow.checked = True ) _ Then ' 'If the OUTPUT WINDOW is not open ' If ( McApplication.ThisApplication.Panels.Control("Output") Is Nothing ) _ ' Then 'If there are no OUTPUT WINDOW CONTENTS in STORAGE If ( _output Is Nothing ) _ Then 'Open the OUTPUT WINDOW with NO CONTENTS McApplication.ThisApplication.Panels.Add _ ( _ "MediaCy.Controls.Output.Output", _ "Output", _ "Output", _ mcPanelLocation.mcplBottom, _ Nothing, _ mcControlType.mcctUserControl, _ Nothing, _ Nothing, _ Nothing, _ mcPanelsOptions.mcpoDoNotDispose _ ) Else 'Open the OUTPUT WINDOW with the PREVIOUS CONTENTS McApplication.ThisApplication.Panels.Add _ ( _ _output, _ "Output", _ "Output", _ mcPanelLocation.mcplBottom, _ Nothing, mcControlType.mcctUserControl, _ Nothing, _ Nothing, _ Nothing, _ mcPanelsOptions.mcpoDoNotDispose _ ) End If ' End If Else ' 'Perform the operations to STORE the CONTENTS of the OUTPUT WINDOW and then HIDE the OUTPUT WINDOW ' If ( McApplication.ThisApplication.Panels.Control("Output") IsNot Nothing ) _ ' Then 'Store the contents of the OUTPUT WINDOW _output = _ McApplication.ThisApplication.Panels.Control("Output") 'Hide the OUTPUT WINDOW McApplication.ThisApplication.Panels.Remove("Output") ' End If ' End If End Sub
also in the PUBLIC CLASS section of the same VB file. Now when I CHECK and UNCHECK the
checkBox_ShowOutputWindow
the PREMIER OUTPUT WINDOW can cycle between SHOW and HIDE and maintain its CONTENTS whether it is DOCKED or UNDOCKED. It also shows the correct status "around" the
AUTOMATE RIBBON + TASK SECTION + OUTPUT PANEL
control.
While picking through this to understand how the code functions, I theorized that theIf ( McApplication.ThisApplication.Panels.Control("Output") Is Nothing )
was not needed. I commented them out (seen in the code above) and everything seems to work super without them. I left them in but COMMENTED OUT in case they were there to handle a situation that PREMIER is not in right now. If this section of code acts up without those statements, I'll understand why you put them in.
Thank you very much for your assistance.
-- Matt
0
Categories
- All Categories
- 961 Image-Pro v9 and higher
- 9 Image-Pro FAQs
- 18 Image-Pro Download & Install
- 448 Image-Pro General Discussions
- 486 Image-Pro Automation (Macros, Apps, Reports)
- 20 AutoQuant Deconvolution
- 2 AutoQuant Download & Install
- 18 AutoQuant General Discussions
- 195 Image-Pro Plus v7 and lower
- 3 Image-Pro Plus Download & Install
- 106 Image-Pro Plus General Discussions
- 86 Image-Pro Plus Automation with Macros
- 19 Legacy Products
- 16 Image-Pro Premier 3D General Discussions
- 26 Image-Pro Insight General Discussions