Toolbar97
Version 1.78

Copyright © 1998-2001 by Jordan Russell
All rights reserved.

e-mail:  jr@jrsoftware.org
web site:  http://www.jrsoftware.org/
(alternate address: http://www.jordanr.cjb.net/)
Get the latest versions on my web site!

Contents


Overview

Toolbar97 is a shareware dockable toolbar component set for Delphi 2.0-6.0 and C++Builder 1.0-5.0 that features the Office 97 look and behavior. Some of its features include:

The successor to Toolbar97, Toolbar2000, is currently under development that is expected to include these major new features and more:

Toolbar2000 will be a free upgrade for currently registered users of Toolbar97.


License

Toolbar97 License Agreement v2.0

"Author" herein refers to Jordan Russell (the creator of the Toolbar97 components).
"Software" refers to all files and source code included with Toolbar97 (typically extracted from a .zip archive), and all content in them, regardless of whether any modifications have been made.

Except where otherwise noted, all of the documentation and Software included in the Toolbar97 package is copyrighted by Jordan Russell (the Author).

Copyright (C) 1998-2001 Jordan Russell. All rights reserved.

This software is provided "as-is," without any express or implied warranty. In no event shall the author be held liable for any damages arising from the use of this software.

Permission is granted for anyone to use this software provided that the following conditions are met:

  1. All redistributions of the Software's files must be in their original, unmodified form. Distributions of modified versions of the files is not permitted without express written permission of the Author.
  2. All redistributions of the Software's files must retain all copyright notices and web site addresses that are currently in place, and must include this list of conditions without modification.
  3. None of the Software's files may be redistributed for profit or as part of another commercial or shareware software package without express written permission of the Author.
  4. You are permitted to Compile the Software into any kind of applications. ("Compile" here refers to the automatic process of translating the Software's source code into executable Intel x86 machine code by the Borland Delphi or C++Builder compilers.)
    However, compilation into commercial or shareware applications, or any applications you are profiting from, requires registration (payment) of the software.
    For information on registering, see the Toolbar97 Documentation or this web page:
    http://www.jrsoftware.org/tb97reg.htm
  5. Redistribution of any of the Software's files in object form (including but not limited to .DCU and .OBJ formats) is strictly prohibited without express written permission of the Author.
  6. Full backward compatibility in future versions of the Software is not guaranteed. In no event shall the Author be held liable for any inconvenience or damages arising from lack of backward compatibility.
  7. The Author reserves the right to, at any time, impose additional restrictions on how the Software may be used.

If you do not agree to any of these terms, you are not permitted to use the Software in any way, and all copies of it must be deleted from your system(s).


Registering Toolbar97

Commerical usage of Toolbar97 requires registration. Registration entitles you to all future versions of Toolbar97 1.x (including full source code), as well as all 2.x versions when they become available.

The cost of a single user license is US$20. This license permits development using Toolbar97 by a single person only. A site license costs US$60, which permits development using Toolbar97 by any number of persons at your place of work. But both licenses allow distribution of Toolbar97 (in compiled form) in any type of application - be it commericial, shareware, or freeware.

The quickest and most convenient way to register Toolbar97 is online via credit card. But if you don't have a credit card, or prefer to register offline, there is also a Register program you can download from my site. The Register program allows you to register Toolbar97 using a check, money order, credit card, or cash (many foreign currencies accepted).

Click here to register Toolbar97

Installation

IMPORTANT: When unzipping Toolbar97, make sure your unzipper is configured to recreate the directory structure (in WinZip, check Use Folder Names).

Delphi 2.0/C++Builder 1.0 installation:

Delphi 2.0/C++Builder 1.0 upgrade:

Delphi 3.0 installation / upgrade:

Delphi 4.0 installation / upgrade:

Delphi 5.0 installation / upgrade:

Delphi 6.0 installation / upgrade:

C++Builder 3.0 installation / upgrade:

C++Builder 4.0 installation / upgrade:

C++Builder 5.0 installation / upgrade:

Once you have Toolbar97 installed, you might want to take a look at the Demo project to see a demonstration of Toolbar97's capabilities.

The Toolbar97 package includes six components: TDock97, TToolbar97, TToolWindow97, TToolbarButton97, TToolbarSep97, and TEdit97. Please read the following sections for important details on each.


Global Functions and Variables

TB97.pas

Functions:

TB97Ctls.pas

Variables:


TDock97 Reference

Description:

Create TDock97 controls at locations you want a TToolbar97 to be able to dock at. These automatically resize as toolbars are docked onto them. Be sure to set the Position property to designate which side of the form the dock is to be located.

Key Properties:

Events:

Key Methods:


TToolbar97 Reference

Description:

This is the toolbar control itself. You can insert TToolbarButton97 controls or any other controls on this. All controls in a TToolbar97 are automatically lined up. To create separators, use the TToolbarSep97 component.

At run-time, any new controls created on a TToolbar97 are initially positioned at the end of the toolbar. To change positions of individual controls at run-time, assign to the OrderIndex property.

Remarks:

When the CloseButton property is True (the default), the toolbar can hide itself if the user clicks the close button on a floating toolbar. Because of this, you should always include an item on a menu that toggles the Visible property so the user can get it back if it is closed. See the demo application source code for an example of this.

Toolbars have to recreate themselves whenever they change from a docked to a floating state and vice versa. Because of this, you may notice that when some types of controls are placed on a toolbar (like TComboBoxes), they don't properly handle this situation (due to bugs) and lose some of their values when docking or undocking occurs. If you notice this happening, you need to respond to the OnRecreating and OnRecreated events. Put code in the OnRecreating event that saves the state of the controls in the toolbar, and put code in the OnRecreated event that restores the state. For example, if you had a TComboBox dropdown list, you could make it save its ItemIndex value into a temporary variable in OnRecreating. OnRecreated could then restore the ItemIndex value from the temporary variable.

Key Properties:

Events:

Key Methods:


TToolWindow97 Reference

Description:

This component is very similar to TToolbar97, but has two key differences: contained controls are not arranged automatically, and floating tool windows may be resized freely.

See the help for the TToolbar97 component for explanations of the properties and events not listed here.

Key Properties:


TToolbarButton97 Reference

Description:

The TToolbarButton97 component is similar to Delphi 3's TSpeedButton component, but it works more like Office 97 and adds some new features. You aren't required to use this for the buttons on toolbar, but it's recommended that you do so.

If you want your application to look just like Office 97, you should leave the width of buttons at 23 pixels and the height at 22 pixels (when viewed in small fonts). Glyphs should be 16x16 pixels (or 17x17 for some disabled glyphs).

See the help for Delphi's TSpeedButton component for explanations of the properties, methods, and events not listed here.

Key Properties:

Key Events:


TToolbarSep97 Reference

Description:

The TToolbarSep97 component is used to create separators between toolbar buttons. It automatically adjusts its size and orientation at design and run time. At run time, it also adjusts its visibility when necessary.

Key Properties:


TEdit97 Reference

Description:

The TEdit97 component is identical to Delphi's TEdit component, except it has the Office 97 appearance, and is missing a few properties that are not applicable.


Known Problems and Conflicts

Problem:
I have a combo box on my toolbar, and whenever I dock or undock the toolbar the combo box's ItemIndex property is reset.
Solution:
This is a bug in the VCL (affecting Delphi/C++Builder versions prior to 4.0), not Toolbar97. Please read the Remarks section of the TToolbar97 reference for information on how to work around this.

Problem:
I have my docks at the edges of the form, but for some reason toolbars are docking in unexpected places, such as the middle of the form.
Solution:
This is due to the design of the VCL, and usually happens if you have multiple controls with the same Align setting. Try setting the FixAlign property for the docks exhibiting this problem.

Problem:
My RichEdit component is now limiting itself to 64KB after adding a toolbar to my form.
Solution:
This problem exists in Windows 95 and 98 (not NT/2000). The bug is not in TCustomToolWindow97, but TCustomToolWindow97 does cause this to start happening by its use of a WH_CALLWNDPROC hook. On 95/98, rich-edit controls start misbehaving if a WH_CALLWNDPROC hook of any kind is installed. Unfortunately there is not much that can be done about this problem, since TCustomToolWindow97 needs to use a hook in certain places for it to work properly, and even the latest RICHED32.DLL still has this problem. One option is to use a rich-edit component based on RICHED20.DLL, which does not exhibit this problem, and is Microsoft's current recommendation. (For one such component, try searching for riched98 or richedit98 on the Delphi Super Page. I'm also told that RxLib contains a Rich Edit 2.0 component.)

Problem:
UpDown controls on TToolbar97's conflict with TToolbar97's automatic control arrangement when their Associate property is assigned.
Solution:
Manually synchronize the UpDown control and its buddy window instead of using the Associate property.


Tips