Class toolbar
Floating toolbar. Can be attached to windows of other programs.
public class toolbar : MTBase
Remarks
To create toolbar code can be used menu TT > New toolbar.
Not thread-safe. All functions must be called from the same thread that created the toolbar object, except where documented otherwise. Note: item actions by default run in other threads; see MTBase.ActionThread.
Namespace: Au
Assembly: Au.dll
Inherited Members
Constructors
Name | Description |
---|---|
toolbar(string, TBCtor, string, int, string, string) |
Properties
Name | Description |
---|---|
Anchor | Specifies to which owner's edges the toolbar keeps constant distance when moving or resizing the owner. |
AutoSize | Automatically resize the toolbar to make all buttons visible.
Default |
AutoSizeWrapWidth | When toolbar.AutoSize is |
Background | Background color or brush. |
Border | Border style. Default TBBorder.Width2. |
BorderColor | Border color when toolbar.Border is TBBorder.Width1 ... TBBorder.Width4.
If |
DisplayText | Display button text. Default |
DpiScaling | Whether to DPI-scale toolbar size and offsets. Default: scale size; scale offsets if anchor is not screen. |
FirstTime | True if this toolbar started with default settings. False if loaded saved settings from file. |
Font | Font properties. |
Hidden | Gets current reasons why the toolbar is hidden. Returns 0 if not hidden. |
Hwnd | Gets the toolbar window. |
IsOpen | Returns |
IsOwned | Returns |
this[string, MTImage, int, string] | Adds button. Same as toolbar.Add. |
Items | Gets added buttons. |
Last | Gets the last added item. |
Layout | Layout of buttons (horizontal, vertical). |
MaximizedWindowTopPlus | Number of pixels to add to the top of the retrieved rectangle of the owner window when it is maximized. That is, move this toolbar slightly down (if positive) or up (if negative). |
Metrics | Sets some metrics of this toolbar, for example button padding. |
MiscFlags | Miscellaneous options. |
Name | Gets the name of the toolbar. |
NoContextMenu | Gets or sets flags to hide some context menu items or menu itself. |
NoDefaultImage | Don't display the default image (dot or triangle). |
Offsets | Specifies distances between edges of the toolbar and edges of its owner, depending on toolbar.Anchor. |
OwnerWindow | Returns the owner top-level window.
Returns |
Satellite | A toolbar attached to this toolbar. Can be |
SatelliteOwner | If this is a satellite toolbar (toolbar.Satellite), gets its owner toolbar. Else |
Sizable | Whether the border can be used to resize the toolbar.
Default |
Size | Toolbar width and height without non-client area when toolbar.AutoSize |
TextColor | Text color.
If |
Transparency | Opacity and transparent color. |
defaultMetrics | Sets default metrics of toolbars. |
Methods
Name | Description |
---|---|
Add(string, Action<TBItem>, MTImage, int, string) | Adds button. Same as toolbar.this[]. |
AutoHide(TBCtor, string, int) | Creates a new toolbar and sets its toolbar.Satellite = this. |
AutoHideScreenEdge(MouseTriggerArgs, Coord, Coord, int, TBCtor, string, int) | Creates a new toolbar and sets its toolbar.Satellite = this. Sets properties for showing at a screen edge. |
AutoHideScreenEdge(TMEdge, screen, Coord, Coord, int, TBCtor, string, int) | Creates a new toolbar and sets its toolbar.Satellite = this. Sets properties for showing at a screen edge. |
Close() | Destroys the toolbar window. |
Group(string) | Adds new horizontal separator, optionally with text. |
Hide(bool, TBHide) | Adds or removes a reason to temporarily hide the toolbar. The toolbar is hidden if at least one reason exists. See also toolbar.Close. |
Menu(string, Action<popupMenu>, MTImage, int, string) | Adds button with drop-down menu. |
Menu(string, Func<popupMenu>, MTImage, int, string) | Adds button with drop-down menu. |
Separator() | Adds new vertical separator. Horizontal if vertical toolbar. |
Show(TriggerArgs) | Shows the toolbar.
If ta is WindowTriggerArgs, attaches the toolbar to the trigger window.
Else if ta != |
Show(screen) | Shows the toolbar. |
Show(wnd, ITBOwnerObject) | Shows the toolbar and attaches to an object in a window. |
Show(wnd, bool) | Shows the toolbar and attaches to a window. |
ToString() | |
find(string) | Finds an open toolbar by toolbar.Name. |
getSettingsFilePath(string) | Gets full path of toolbar's settings file. The file may exist or not. |
toolbarsDialog(bool) | Creates a window with a list of toolbars of this thread. Can be used to find lost toolbars. |
Events
Name | Description |
---|---|
Closed | When the toolbar window destroyed. |