Contents -- GT Toolbar Kit v1.0
GT Toolbar Kit v1.0

License & Copyright

Disclaimer of Liability & Warranty

Revision History

	GT Toolbar
	GT Panel


GT Toolbar
	GT Toolbar Properties Events
Description

GT Toolbar is a custom control to help you implement a toolbar for your application.  Although the control is actually a custom button, you can make an array of these buttons to make implementing a toolbar less of a chore.

Object Type

GTTBar

Remarks

GT Toolbar is a graphical control hence it does not take up valuable Windows resources.  I know there are a few other toolbar custom controls out there but when I tried those which I can get my hands on, it left me with a not so satisfied feeling manily because the controls flicker when repainted or when some visual aspect changes (e.g., from enabled to disabled state).  I've written GT Toolbar with the primary goal that the controls don't flicker as much or at all.  You be the judge.

If you feel the text describing the special properties of GT Toolbar is not very enlightening, please take time to go through the included project.  The application of the special properties in the project may be more explanatory of how the properties work and how they are used.


Properties

All of the properties for this control are listed in the following table.  Properties that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*).  For documentation of the remaining properties, see your Visual Basic Languare Reference manual or the Visual Basic Help File.

CellHeight	Left	Tag
CellWidth	Name	Top
Enabled	Offset	Type
Height	Parent	Visible
Index	Picture	Width


Events

All the events supported by GT Toolbar are listed in the table below.  The use/handling of all the listed events below are identical to Visual Basic's List Box control. Please consult your Visual Basic Languare Reference manual for a description of these events.

Click	MouseOver


CellHeight Property

Description

Specifies the cell height of each element in the toolbar bitmap.  This property is read and write both at run-time and design-time.  If Type property is set to Standard, this property is read-only.

Usage

[form!]tbar.CellHeight [ = n ]

Remarks

GT Toolbar expects a bitmap's height to be twice that the height of a cell.  The upper half of the bitmap contains toolbar elements for enabled buttons and the lower half contains the disabled elements corresponding to each enabled element in the upper half.

Data Type

Integer


CellWidth Property

Description

Specifies the cell width of each element in the toolbar picture.  This property is read and write both at run-time and design-time.  If Type property is set to Standard, this property is read-only.

Usage

[form!]tbar.CellWidth [ = n ]

Remarks

GT Toolbar uses the CellWidth, CellHeight , and the Offset properties to locate and extract a toolbar element out of the bitmap assigned to the Picture property.  It is therefore very important that these properties be accurate.

Data Type

Integer


Offset Property

Description

The Offset property is used to locate a toolbar element in the bitmap assigned to the Picture property.  The first element , from left to right, is offset 0

Usage

[form!]tbar.Offset [ = n ]

Data Type

Integer


Picture Property

Description

The Picture property holds the bitmap which contains the toolbar button elements.  The layout of the toolbar elements in the bitmap must be so the top half of the bitmap defines all the enabled button faces and the lower defines, in corresponding order, the disabled faces.  Each cell in the bitmap must be of equal size.  Below is the bitmap for the Standard Type property.

Usage

[form!]tbar.Picture [ = picture ]

Remarks

If all button faces for each of the toolbar button is contained in one bitmap, you should only assign the bitmap to one toolbar button at design-time.  This way, only one copy is included in your program's .exe file.  Also, if you assign a bitmap to a toolbar button using another control's Picture property, whether or not it's a GT Toolbar button, the destination control's Picture property will not get a copy of the source's bitmap but rather a reference to that bitmap.  This saves memory and is also more efficient.

Data Type

Integer


Type Property

Description

The Type property tells GT Toolbar whether to use its built-in toolbar bitmap or to use the bitmap in the control's Picture property.  This option is only available in the registered version of the control.

Usage

[form!]tbar.Picture [ = Standard | Custom ]

Remarks

The Standard (or built-in) bitmap contains 20 button elements.  The button elements are:

Data Type

Enumerated Integer


License and Copyright

GT Toolbar Kit v1.0 is a shareware product.  Users who don't need the ability to use their own button bitmap can use this product without registering although they are still encouraged to register.  Registering will support and encourage the author to develop other useful custom control which will hopefully increase your productivity.

Registration is $15.00 dollars payable in U.S. funds only.   A money order or a bank draft (e.g., Cashier's check) is preferred.  Make it payable to George R. Torralba.  The author's mailing address is:

George R. Torralba

8728 Phinney Ave. N #8

Seattle, WA  98103

GT Toolbar Kit v1.0 is Copyright © 1993 George R. Torralba.

Portions of this software are Copyright © Microsoft ® Corporation.


Disclaimer of Liability and Warranty

The author, George R. Torralba, will not be responsible for any damages, direct or consequential, from the use of this product.  This product does not come with any kind of warranty, express or implied.  Use it at your own risk.  For registration, bug reports, comments, suggestions  you can reach the author at:

Email:	grtorlba@seattleu.edu (preferred)

US Mail:	George R. Torralba
8728 Phinney Ave. N #8
Seattle, WA  98103

Phone:	(206) 781-7622


Revision History

Version 1.0	•	Initial release.


Cell

A cell is defined as the area each element in the toolbar picture occupies (red outline).  This usually is the width of the whole bitmap divided by the number of elements.  Each toolbar element must be centered within its individual cell.


GT Panel
	GT Panel Properties Events
Description

GT Panel was pretty much designed to be used in conjuction with GT Toolbar.  GT Panel works like the 3D Panel control that  comes with the professional edition of Visual Basic although I've only adapted the features from that control which is most useful in the application of a toolbar.  GT Panel can also be used as a status bar container.

Object Type

GTPanel


Properties

All of the properties for this control are listed in the following table.  Properties that apply only to this control, or that require special consideration when used with it, are marked with an asterisk (*).  For documentation of the remaining properties, see your Visual Basic Languare Reference manual or the Visual Basic Help File.

Align	FontItalic	Index
BackColor	FontName	Left
BevelWidth	FontSize	Name
BorderStyle	FontStrikeThru	Parent
Caption	FontUnderline	Tag
ClipControls	ForeColor	Top
Enabled	hDC	Visible
Flags3D	Height	Width
FontBold	hWnd


Events

All the events supported by GT Toolbar are listed in the table below.  The use/handling of all the listed events below are identical to Visual Basic's List Box control. Please consult your Visual Basic Languare Reference manual for a description of these events.

Resize


BevelWidth Property

Description

Sets the width of the panel's bevel width.  This property applies only when the BorderStyle property is set to 3 - 3D Raised or 4 - 3D Recessed.Read/write at run-time and design-time

Usage

[form!]gtpanel.BevelWidth [ = n ]

Data Type

Integer


BorderStyle Property

Description

Sets the border style of the property.  Available styles are:

0 - None	3 - 3D Raised

1 - Fixed Single	4 - 3D Recessed

2 - Outline

Usage

[form!]gtpanel.BorderStyle [ = 0 -4 ]

Data Type

Enumerated Integer


Flags3D Property

Description

Determines which side(s) of the control's 3D border will be drawn.  This property is only used when BorderStyle is set to 3 - 3D Raised or 4 - 3D Recessed.Read/write at run-time and design-time.  Available flag values and what they do are:

DR3LEFT	&H01	Only draw the left border

DR3TOP	&H02	Only draw the top border

DR3RIGHT	&H04	Only draw the right border

DR3BOTTOM	&H08	Only draw the bottom border

DR3ALL	&H15	Draw all border sides

Usage

[form!]gtpanel.Flags3D [ = n ]

Remarks

Flags can be combined using the boolean OR operator.

Data Type

Integer