|
|
Visits:
2385
(18 on line)
|
Last Update: Dec 5, 2003
|
|
|
|
| | |
| Description Inheritance Example Properties Methods |
| |
| Description |
The TStatus5 is a cover object simplifying use of the APL+Win Status object It allows you to display a running clock in your Status bar as well as a progress bar Status fields are most easily updated using the Gets5 utility |
| Description Inheritance Example Properties Methods |
| |
| Inheritance |
Inherits from: TObject5 |
| Description Inheritance Example Properties Methods |
| |
| Example |
| |
 |
| |
The above example was generated by the following APL+Win Objects code: |
'ff'Œwi'*Create' 'TForm5'('*caption' 'TStatus5 Example')('*size'300 400)'DemoShow' 'SessionFocus'
'ff.sb'Œwi'*Create' 'TStatus5'
Œdl 2
'sb'Gets5 1'This text is displayed in field #1'
Œdl 2
'sb'Gets5 3'Show field 3'
'sb'Gets5 4'Show field 4'
Œdl 2
'sb'Gets5 ¯14'Overlay all existing fields with field ¯14'
Œdl 2
'sb'Gets5 ¯14'' © hide overlay field (¯14)
Œdl 2
'sb'Gets5 ¯15 0 ª 0 0½Œdl.3 © display Progress Bar in field ¯15
'sb'Gets5 ¯15 10 ª 0 0½Œdl.3 © progress it to 10%
'sb'Gets5 ¯15 20 ª 0 0½Œdl.3
'sb'Gets5 ¯15 30 ª 0 0½Œdl.3
'sb'Gets5 ¯15 40 ª 0 0½Œdl.3
'sb'Gets5 ¯15 80 ª 0 0½Œdl.3
'sb'Gets5 ¯15 100
Œdl 2
'sb'Gets5 ¯15 ¯1 © hide progress bar by displaying a negative progress value
Œdl 2
'sb'Gets5 3'' © hide field 3
Œdl 2
'sb'Gets5 4'' © hide field 4
'sb'Œwi'fieldname'
1 Field1
2 Field2
3 Field3
4 Field4
5 Field5
6 Field6
7 Field7
8 Field8
9 Field9
caps caps
num num
scroll scroll
Œts ts
¯14 overlay
¯15 pbar
'sb'Œwi'fieldname'3'user'
'sb'Œwi'fieldname'(2 2½1'file'4'test')
'sb'Gets5'user' 'lescasse'
'sb'Gets5'file' 'c:\temp\test.txt'
'sb'Gets5'pbar' 10
'sb'Gets5'pbar' 20
'sb'Gets5'pbar' 30
'sb'Gets5'pbar' 100
'sb'Gets5'pbar' ¯1
'sb'Gets5'overlay' 'This is a long message displayed in overlay field'
'sb'Gets5'overlay' ''
|
| |
| Description Inheritance Example Properties Methods |
| |
| Properties |
| |
|
| class |
Description: Return current object class
Syntax: class„'obj' Œwi 'class' |
| fieldname |
Description: Get or Set the field name for one of the status fields
Syntax: {fieldnames„'} 'obj' Œwi 'fieldname' {fieldname}
fieldname: a nested vector containing a field number (from 1 to 9) and a field name
or a 2-column nested matrix such that:
[;1] „… field numbers (1 to 9)
[;2] „… field names
Example:
'ff.sb' Œwi 'fieldname' (3 2½1'file'2'user'3'computer')
*: Œerror(^\Œdm¬Œtcnl)/Œdm } |
| fields |
Description: The fields property returns the predefined status bar field numbers
Syntax: 'obj' Œwi 'fields'fieldtypes
fieldtypes: a vector of fieldtypes defined as follows
fieldtypes are defined as follows:
1 main status bar field
2 Caps Lock field
3 Num Lock field
4 Scroll Lock field
5 Date/Time field
6 regular field (60 chars width)
7 regular field (minimum width)
Example:
'ff.sb' Œwi 'fields'1 2 3 5 |
| help |
Example:
0 0½'ff' Œwi '*Create' 'TForm5' ('*caption' 'TStatus5 Example') ('*size'300 400) 'DemoShow' 'SessionFocus'
0 0½'ff.sb' Œwi '*Create' 'TStatus5'
© By default, a TStatus5 bar contains 9 standard fields, only the first
© one being visible, a CAPS field, a NUM field, a SCROLL field
© a Timestamp field and 2 overlay fields: one (numbered ¯14) for displaying
© text and the other one (numbered ¯15) for displaying a progress bar
0 0½Œdl 2
'sb'Gets5 1'This text is displayed in field #1'
0 0½Œdl 2
'sb'Gets5 3'Show field 3'
'sb'Gets5 4'Show field 4'
0 0½Œdl 2
'sb'Gets5 ¯14'Overlay all existing fields with field ¯14'
0 0½Œdl 2
'sb'Gets5 ¯14'' © hide overlay field (¯14)
0 0½Œdl 2
'sb'Gets5 ¯15 0 ª 0 0½Œdl.3 © display Progress Bar in field ¯15
'sb'Gets5 ¯15 10 ª 0 0½Œdl.3 © progress it to 10%
'sb'Gets5 ¯15 20 ª 0 0½Œdl.3
'sb'Gets5 ¯15 30 ª 0 0½Œdl.3
'sb'Gets5 ¯15 40 ª 0 0½Œdl.3
'sb'Gets5 ¯15 80 ª 0 0½Œdl.3
'sb'Gets5 ¯15 100
0 0½Œdl 2
'sb'Gets5 ¯15 ¯1 © hide progress bar by displaying a negative progress value
0 0½Œdl 2
'sb'Gets5 3'' © hide field 3
0 0½Œdl 2
'sb'Gets5 4'' © hide field 4
© To make it easier to use, associate names with status bar fields:
'sb' Œwi 'fieldname'
'sb' Œwi 'fieldname'3'user'
'sb' Œwi 'fieldname' (2 2½1'file'4'test')
'sb'Gets5'user' 'lescasse'
'sb'Gets5'file' 'c:\temp\test.txt'
'sb'Gets5'pbar' 10
'sb'Gets5'pbar' 20
'sb'Gets5'pbar' 30
'sb'Gets5'pbar' 100
'sb'Gets5'pbar' ¯1
'sb'Gets5'overlay' 'This is a long message displayed in overlay field'
'sb'Gets5'overlay' '' |
| status |
Description: Get or Set the status bar <status> property
Syntax: {status„'} 'obj' Œwi 'status' {status}
status: a nested vector containing positive numbers, negative numbers
and/or 'caps' 'num' 'scroll' ' Œts'
Example:
'ff.sb' Œwi 'status'1 2 3 'caps' ' Œts' ¯14 ¯15 |
|
| Description Inheritance Example Properties Methods |
| |
| Methods |
| |
|
 |
| GetField |
Description: Gets the text in one or more status fields
Syntax: 'obj' Œwi 'GetField'fields
fields: one or more field number or field names
Example:
'ff.sb' Œwi 'fieldname'3'user'
'ff.sb' Œwi 'GetField'3
'ff.sb' Œwi 'GetField' 'user' |
| New |
Description: Create a new instance of TStatus5
Example:
'obj' Œwi '*Create' 'TStatus5'
|
| SetField |
Description: Changes text in one or more status fields
Syntax: 'obj' Œwi 'SetField'field value
field: a field number or field name
value: a numeric scalar or vector or a character string
Example:
'ff.sb' Œwi 'fieldname'3'user'
'ff.sb' Œwi 'SetField' 'user' 'lescasse'
'ff.sb' Œwi 'SetField'2'c:\temp\test.txt'
'ff.sb' Œwi 'SetField' 'overlay' 'This is a long message to be displayed in the status bar overlay field' |
|
| Description Inheritance Example Properties Methods |
| |
|