Properties
ctlCaption
Property.
Value Type: Character
Default Value: None
R/W: Read/Write
This property is a shortcut to StatusBar.PanelMessage.ctlCaption
The text to display in the first leftmost panel, the Message Panel.
If set, overrides any other text set from Menus and controls StatusBarText.
Set it to an empty string to continue display of normal statusbar messages.
See also the Message property.
ctlClick
Event.
Occurs when the user clicks in the statusbar with the left mouse
button
ctlDblClick
Event.
Occurs when the user clicks twice in the statusbar in quick
succession, also fires a Click/RightClick event before it.
ctlGetStringSize(cExpression, cFlags)
Method.
Returns the Width or the Height of the specidfied cExpression
character string, calculated with the font properties of the
StatusBar font (Name, Size, etc) Useful when setting the ctlAutosize
property of a Panel to .F. and we need to know how wide is a
character expression to set the ctlWidth property of the Panel.
cFlag = "W" returns Width (default)
cFlag = "H" returns Height
ctlHWnd
Property.
Value Type: Numeric
Default Value: 0
R/W: Read
Returns a window handle to the control.
The Microsoft Windows operating environment identifies each form
in an application by assigning it a handle, or hWnd. The hWnd property
is used with Windows API calls. Many Windows operating environment functions
require the hWnd of the active window as an argument.
ctlIcon
Property.
Value Type: Character
Default Value: None
R/W: Read/Write
cFileName specifies the file name and path of the icon to display
in the message panel. Icon file should have a 16x16 256 color icon.
This property is a shortcut to StatusBar.PanelMessage.ctlIcon
If the file you specify does not exist, no error is raised, and the
previous icon, if one was defined, is removed.
To remove an icon, set the value to an empty string. The icon files
should be included in the project. There is no need to copy the icon
files when deploying the application.
ctlInit
Event.
This event is useful when using a status bar in a top level form.
Code in this event gets ejecuted after the status bar has been
created, so you can customize it here
ctlLangID
Property.
Value Type: Numeric
Default Value: 0
R/W: Read/Write
When set to a value other than 0x0, it overrides the sytem locale
language for language strings of the control. In the status bar, the
text of the Caps Lock, Num Lock and Insert indicators.
See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/nls_61df.asp
for locale codes.
ctlMessage
Property.
Value Type: Character
Default Value: None
R/W: Read/Write
This property is a shortcut to StatusBar.PanelMessage.ctlCaption
The text to display in the first leftmost panel, the Message Panel.
If set, overrides any other text set from Menus and controls StatusBarText.
Set it to an empty string to continue display of normal statusbar messages.
nButton
Property.
Value Type: Numeric
Default Value: 0
R/W: Read
Returns a number that specifies which mouse button was clicked in
the last Click, DblClick or RightClick
1: Left mouse button
2: Right mouse button
nPanel
Property.
Value Type: Numeric
Default Value: 0
R/W: Read
Returns a number that specifies which panel was clicked on the last
Click, DblClick or RightClick event.
-2: no panel, clicked in borders or sizing grip area
-1: PanelMessage
0: PanelProgressBar (The panel, not the progressbar itself)
n: Panels(n) Where n is a custom panel number from 1 to 100
101: PanelOvr
102: PanelCaps
103: PanelNum
104: PanelDate
nXCoord
Property.
Value Type: Numeric
Default Value: 0
R/W: Read
The horizontal (nXCoord) position of the mouse pointer in the last
Click or DblClick event, relative to the
top left corner or the statusbar.
nYCoord
Property.
Value Type: Numeric
Default Value: 0
R/W: Read
The vertical (nYCoord) position of the mouse pointer in the last
Click or DblClick event, relative to the
top left corner or the statusbar.
ctlPanelCount
Property.
Value Type: Numeric
Default Value: 5
R/W: Read/Write
Specifies the number of Panel objects, available at design time and
read only at run time. When instantiating a StatusBar in code, the number
of panels should be passed as a parameter. Maximum number of custom
panels is 100. (more than enough I think). The value of PanelCount should
not be changed at run time.
ctlPanels(nPanel)
Property.
An array for accessing individual custom Panel objects in
the control by panel number. Read-only at run time.
The custom panels can be referenced by this array. If you have 3
custom panels in the status bar, then you will have:
StatusBar.Panels(1)
StatusBar.Panels(2)
StatusBar.Panels(3)
The built in panels cannot be referenced this way, they are not part
of this array.
The must be referenced by their names.
ctlRightClick
Event.
Occurs when the user clicks in the statusbar with the right mouse
button
ctlSizeGrip
Property.
Value Type: Logical
Default Value: .T.
R/W: Read/Write
Specifies whether a sizing grip will be shown in the status bar.
The sizing grip will be disabled when a form is maximized or its
border style is not sizable.
ctlThemes
Property.
Value Type: Logical
Default Value: .T.
R/W: Read/Write
Specifies whether Windows XP Themes are enabled or disabled for a
control. Read/write at design and run time.
ctlUpdatePanels() 2006XXXX
Method.
Updates the updatable panels: PanelMessage, PanelOvr, PanelNum.
PanelCaps, PanelDate
ctlVcxCommon
Property.
Value Type: Character
Default Value: ctl32_common.vcx
R/W: Read/Write
Specifies the location and file name of the ctl32_common vcx file
ctlVcxProgressBar
Property.
Value Type: Character
Default Value: ctl32_progressbar.vcx
R/W: Read/Write
Specifies the location and file name of the ctl32_progressbar vcx
file
ctlVcxStructs
Property.
Value Type: Character
Default Value: ctl32_structs.vcx
R/W: Read/Write
Specifies the location and file name of the ctl32_sctrucs vcx
file
ctlUpdateStyle
Property.
Value Type: Numeric
Default Value: 1
R/W: Read/Write
Indicates the update method to use to update the panels
(PanelMessage, PanelOvr, PanelNum. PanelCaps, PanelDate)
1: Update with VFP timer
2: Update using WM_ENTERIDLE message (http://blogs.msdn.com/calvin_hsia/archive/2006/03/08/546722.aspx)
When using ctlUpateStyle = 2 the status bar will only display
messages from the menu options, if the menu options have any message
text set. The statusbar will not display the text of controls with
StatusBarText property set.
3: No automatic update, the updates will be done using
ctlUpdatePanels()
Panel Objects (only available at
run time)
This is the list of the names of the available panels:
PanelMessage
PanelProgressBar
Paneln or Panels(n)
n is the panel number of the custom panel, for example, if we have
3 custom panels, panel number two can be referred to as "Panel2" or
Panels(2) or we can change its Name property and call it what we want,
"PanelUser" for example.
PanelOvr
PanelCaps
PanelNum
PanelDate
Panel Properties:
ctlAlignment
Property.
Value Type: Numeric
Default Value:
R/W:
0 Left
1 Right
2 Center
ctlAutosize
Property.
Value Type: Logical
Default Value:
R/W:
True / False
ctlCaption
Property.
Value Type: Character
Default Value:
R/W:
The text to display in the Panel.
ctlFormat
Property.
Value Type: Numeric
Default Value:
R/W:
Sets date format for PanelDate
0 Nothing
1 Short date
2 Long date.
The date is shown in the Windows formats set in Control Panel.
Applies to: PanelDate panel only.
ctlIcon
Property.
Value Type: Character
Default Value:
R/W:
Full path and name to a 16x16 256 color icon (".ico") file to display
in the Panel. Set to an empty string to clear the Icon.
ctlIndex
Property.
Value Type: Numeric
Default Value:
R/W:
Returns the index number of the custom Panel. This is the index used
by the statusbar, it is 0 based. Used internally by class to send messages
to statusbar window control.
ctlName
Property.
Value Type: Character
Default Value:
R/W:
The name of each Panel. You can change the names of the custom panels
from Paneln to what you want.
Remarks:
Property "Name" can still be used, this property was added to be
consistent in the naming conventions.
ctlToolTipText
Property.
Value Type: Character
Default Value:
R/W:
The text to display in the Panel ToolTip. This text will display
if any of this conditions is true:
There is only an Icon with no Caption text.
ctlAutosize is .F.: when the Caption text does not fit in the Panel,
or Alignment is Left.
ctlAutosize is .T.
ctlVisible
Property.
Value Type: Logical
Default Value:
R/W:
Specifies whether a Panel is visible or hidden. True/False, 0/1.
The first panel, PanelMessage is always visible.
ctlWidth
Property.
Value Type: Numeric
Default Value:
R/W:
Sets the Width of a Panel when its ctlAutosize property
is set to False
Remarks:
Property "Width" can still be used, this property was added to be
consistent in the naming conventions.
Note
All properties and methods with a name that start with "_" are
only for internal use by the class itself.