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
You can use the following code.
Sub HideOutput ThisApplication.Panels.SetAutoHide("Output",True) End Sub Sub ShowOutput ThisApplication.Panels.SetAutoHide("Output",False) End Sub
Pierre
Thank you for your response.
Your solution did not work for me until I made a slight revision.
did not work until I had manually or programmatically executed a
Here is the CODE that works for me . . . .
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 the
Thank you very much.
-- Matt
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
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
I appreciate your investigating this.
-- Matt
Thank you for your response.
I have modified my code with
In the PUBLIC CLASS section of the APPLICATION'S VB CODE and
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 the
If ( 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