Overview

This toolBar object is for developers to use in programs developed in PowerBuilder. The look and feel of the toolBar is similar to those found in Kodigo, Visual Studio, PowerToTheBuilder, etc.

What makes the toolBar offering unique in that it is written in PowerBuilder using the dataWindow object as its means of transport. The toolBar, for all intents and purposes, is a datawindow placed on a window/userObject. It takes advantage of features built into the dataWindow and uses only Windows API calls and calls into the PBVMxxx.dll. There are no other "external" DLLs or PBNI code.

Implementing

Include dwgui.pbl in your project.

If you do not use the PFC, include dwgui_PFC.pbl as well. The PFC objects are provided as a courtesy. The main requirements from the PFC are n_cst_color (in general), n_cst_numerical.of_bitWiseAnd(), n_cst_string.of_globalReplace() and n_cst_string.of_parseToArray(). If you have your own versions of these routines, feel free to modify your copy of the code accordingly. These are modified copies of the corresponding PFC objects and should not be used to replace any PFC objects already in your project.

The PFC objects contained in the dwGUI_PFC_textOnly.pbl are only provided to make the test window work and are not needed to use the toolBar in your project. These are modified copies of the corresponding PFC objects and should not be used to replace any PFC objects already in your project.

Once you have your target updated, placing u_cst_toolBar from the dwgui.pbl on an object will provide you with the toolBar capability contained in this project.

Constants

ue_itemClicking Outcomes
Name Value Description
ALLOW 1 The button click is allowed
PREVENT -1 The button click is NOT allowed
General return conditions
Name Value Description
SUCCESS 1 Successful completion
NO_ACTION 0 No action was taken
FAILURE -1 Failed completion
AddItem Positions
Name Value Description
LEFT 1 Adds the item in the next available position, from left to right, on the left side of the toolbar
RIGHT 2 Adds the item in the next available position, from right to left, on the right side of the toolbar
ToolBar Layout
Name Value Description
HORIZONTAL 1 Displays the toolbar horizontally across the window
VERTICAL 2 Displays the toolbar vertically down the window. This is NOT yet supported
Picture Sizes
Name Value Description
SMALL 16 Displays pictures as 16x16 pixels
MEDIUM 24 Displays pictures as 24x24 pixels
LARGE 32 Displays pictures as 32x32 pixels
XLARGE 48 Displays pictures as 48x48 pixels

Properties (set at design time)

Name Type Default Description
#DisplayBorder Boolean TRUE Draws a border around the toolbar
#RaisedBorder Boolean FALSE Draws a raised border around the toolbar, used in conjunction with DisplayBorder
#SolidBackGround Boolean FALSE Switches between a solid and a gradient background
#FontFace String Tahoma Used to determine the type face of the text displayed on the toolbar
#FontSize Long 8 Determines the size used for the type face of the text displayed on the toolbar
#BitMapSize Long 16 Indicates the size of the pictures displayed on the toolbar and causes the size of the toolbar to change to accommodate the pictures. Valid choices are SMALL, MEDIUM, LARGE AND XLARGE. Can also be changed at runtime by selecting size from the context sensitive menu
#Band String detail Name of the dataWindow band on which the toolbar objects are to be created
#ToolTipDelayInitial Long 1000 How long to hover before toolTips are enabled (value in millseconds)
#ToolTipDelayVisible Long 32000 How long to display toolTips (value in milliseconds)
#ToolTipIsBubble Boolean TRUE Enables/Disables the display of toolTips as a bubble

Events

Public Methods

Last edited Sep 28, 2016 at 10:47 AM by cjharris02892, version 60