Show / Hide Table of Contents

Method toolbar.Hide


Overload

Adds or removes a reason to temporarily hide the toolbar. The toolbar is hidden if at least one reason exists. See also toolbar.Close.

public void Hide(bool hide, TBHide reason)
Parameters
hide  (bool)

true to hide (add reason), false to show (remove reason).

reason  (TBHide)

A user-defined reason to hide/unhide. Can be TBHide.User or a bigger value, eg (TBHide)0x20000, (TBHide)0x40000.

Exceptions
InvalidOperationException
  • The toolbar was never shown (toolbar.Show not called).
  • It is a satellite toolbar.
  • Wrong thread. Must be called from the same thread that created the toolbar. See MTBase.ActionThread.
ArgumentOutOfRangeException

reason is less than TBHide.User.

Remarks

Toolbars are automatically hidden when the owner window is hidden, minimized, etc. This function can be used to hide toolbars for other reasons.