appbar TacAppBar component
Hierarchy Properties Methods Events FAQ Example
Return to Introduction  Previous page  Next page
Overview
The acAppBar component lets your forms to behave like an Application Desktop Toolbar — to dock on the edges of the screen like usual taskbar or MS-Office panel. Though appbars are usually docked on an edges of the user's screen, they also can float as usual windows.  
 
When the AppBar is anchored to the screen edge, it can be automatically hidden from screen when other window activated and popup on screen again when user point the mouse to the thin line on screen edge. User can dock or undock the appbar just moving it with mouse pointer. All automatic movements of the appbar can be displayed with smooth sliding effect. Component contains a whole bunch of neat additional features, such like docking and sizing rules, float restrictions, registry saver, animation effects and so forth...  

How to use ?
Most simple and quickest way to test the Application Desktop Toolbar features — drop acAppBar component on your form, compile and execute your program. Then try to move your form driving it to the screen edges. Form will be docked and undocked by mouse pointer. You may change the Placement property in your program and docking placement will be changed accordingly with smooth animation effect (if Sliding is enabled).  
 
You can also specify initial placement at design-time, changing value of Placement property. To disallow docking on some screen edges — use AllowedEdges property. To let the AppBar automatically hide from screen — make AutoHide property True.  
 
Also, the acAppBar can automatically save and restore form placement on every program restart, see RegistrySaver structure.  

Basic features / properties
AllowedEdgesspecifies whether your form is able or unable to be docked to enumerated edges;  
AlwaysOnTopensures that the appbar is always visible, even when you run another programs in a maximized window;  
AutoHidecontrols whether AppBar can be hidden (reduced to a thin line) at the edge of screen;  
Placementcontrols current AppBar placement. Change the Placement property to dock / undock the AppBar to specified edge. The replacement can be shown with smooth animation effect if Sliding effect is enabled;  
LastDockingPlacedetermines the previous AppBar placement. When user doubleclicks the AppBar, it will restore previous placement;  
Dockingstructure controls the AppBar size when form is docked to the screen edge. You can enable or disable docking rules, specify maximum and minimum horizontal and vertical size when form is docked, specify width and height of the AppBar when it docked to the screen edge;  
Sizingstructure controls sizing rules of the AppBar. You can specify the horizontal and vertical increment of the form with AppBar;  
Slidingstructure controls whether you would like to show automatic AppBar movements with smooth sliding effect. In example, your form is docked to the screen edge and it able to auto-hide from screen. When user move mouse pointer to thin line on screen edge, for will appears with sliding effect. Time of effect can be specified in the SlideTime property;  
FloatRestrictionsstructure controls the size restrictions when form in normal, "floating" state (when Placement property is bpFloat);  
RegistrySaversaves and restores from the system registry all AppBar settings to the on program restart;  
TaskIconspecifies whether you would like to show the program icon on taskbar when the AppBar docked to screen edge.  
 
Some frequently asked questions
Q.When user doubleclicks the form, the AppBar will restore previous placement [LastDockingPlace property]. Is there a way to avoid re-positioning of the AppBar ?  
A.To disallow restoring of previous placement on double click, just hook OnDblClick event.  
 


Q.I have docked the AppBar to the left border of screen on program startup but the form appears with the same width as in "floating" state!  
A.Seems that your form contains a lot of non-resizeable (not aligned) controls and should have enough space to show them, however can not auto-scroll for displaying. Just set "AutoScroll" property of your form to True.  
 


Q.I have docked the form to the screen edge, but seems I can not resize it. Your demo programs allows to resize docked appbars. I have also checked Enabled property of Sizing structure and it's True. What I doing wrong?  
A.Sure, you can not resize forms with fixed BorderStyle (i.e.: bsDialog or bsSingle). Just make your form resizeable, set BorderStyle property to bsSizeable or bsSizeToolWin.  
 


Q.Is there a way to delay the popup when anchored to the edge of the screen [when the AppBar is "autohidden"]? (I've had a couple users complain that they moved their mouse to fast when trying to get to a desktop icon or somewhere else and went to far and caused the appbar to pop out even though they quickly moved it away)  
A.Yes. You should hook OnUnhiding event and unhide the AppBar with delay (delay can be implemented with TTimer component), using ShowHiddenAppBar method. Please check out an example for more details.  
 


Q.I have a form with AppBar on it. There is a panel on the form. This hides part of the form. When I try to drag the form to dock it to the side of the screen or to undock it obviously now it doesn't work. Could you suggest a way in which I could fire the event which docks, undocks and moves the form when the user clicks or tries to drag the panel component.  
A.In v1.7 we have added bonus component, TacDragPanel. You can drop this panel to the AppBar and user will be able to move and dock the appbar dragging this panel.