|
|
Visits:
2369
(27 on line)
|
Last Update: Dec 22, 2003
|
|
|
|
| | |
| Description Inheritance Example Properties Methods |
| |
| Description |
The TInfo5 Object is used for displaying mini information windows on the screen
They are useful for making user wait while a process is running as well as informing them about the running process
These information windows replace the Status Bar messages. They can be centered on the screen or on
any APL+Win object. Their width can be automatically adapted to the text they content.
They can also be displayed for any given length of time. The mouse pointer is automatically changed
to an HourGlass when a TInfo5 window is displayed and changed back to the standard mouse pointer
when the TInfo5 Window is hidden. |
| Description Inheritance Example Properties Methods |
| |
| Inheritance |
Inherits from: TObject5 |
| Description Inheritance Example Properties Methods |
| |
| Example |
| |
 |
| |
The above form is generated by the following APL+Win Objects code: |
'info'Świ'*Create' 'TInfo5' © create information window object
'info'Świ'caption' 'This information window replaces Status Bar messages'
'info'Świ'color'204 204 255 © sets information window color
'info'Świ'owner' '' © centers information window in workarea
'info'Świ'Show'
'info'Świ'caption' 'This is a small information window' © sets the information window text
'info'Świ'*Hide' © hides information window
'info'Świ'Animate' 'Printing in progess...'200
'info'Świ'*Hide' © hides information window
'gg'Świ'*Create' 'TForm5'('*caption' 'TInfo5 Example')('*size'200 350)'DemoShow' 'SessionFocus' © creates a form object
gg
'info'Świ'owner' 'gg' © centers information window over object gg
'info'Świ'*Set'('width'200)('caption' 'This is another info window')'Show' © forces information window width to 200
'info'Świ'*Set'('color'204 255 204)('caption' 'New information window') © display another information window
'info'Świ'caption' 'Third information window' © display another information window
'info'Świ'caption' 'Fourth information window' © display another information window
'info'Świ'*Set'('width'0)('caption'('Fifth information window',Śtcnl,'on several lines')) © display another information window
'info'Świ'*Set'('width'0)('color'204 204 255)('delay'2)('caption' 'Sixth information window for 2 seconds only!') © display another information window
|
| |
| Description Inheritance Example Properties Methods |
| |
| Properties |
| |
|
| caption |
Description: Get or Set the TInfo5 window information text
Syntax: {infotext„'} 'obj' Świ 'caption' {infotext}
infotext: a character string (optionnally containing ŚTCNL's)
Notes:
1. if <infotext> is empty the TInfo5 window is hidden from the screen
2. if the caption contains ŚTCNLs, the TInfo5 window spans over multiple lines
3. setting the caption does not show the TInfo5 window: use the <Show> method to show it
Example:
'info' Świ '*Set' ('caption' 'Printing the report... Please Wait!') 'Show'
'info' Świ 'caption' '' © same as: 'info' Świ '*Hide' |
| class |
Description: Return current object class
Syntax: class„'obj' Świ 'class' |
| color |
Description: Allow to specify the TInfo5 window background color
For best results choose 3 colors among 51 102 153 204 255
Syntax: {rgb„'} 'obj' Świ 'color' {rgb}
rgb: a 3-element vector (in fact blue-green-red)
Example:
'info' Świ 'color'204 255 204 |
| delay |
Description: Get or Set the delay (in seconds) during which the TInfo5 window is displayed
Syntax: {seconds„'} 'obj' Świ 'delay'seconds
seconds: the delay in seconds during which the TInfo5 information window is displayed
Note: when the delay expires, the TInfo5 window is hidden from the screen but not deleted
the Timer fires only once and is immediately deleted
Example:
'info' Świ '*Set' ('caption' 'Display this window during 3 seconds!') ('delay'3) 'Show' |
| help |
Example:
© Displays a small information window on the screen. Example:
0 0˝'info' Świ '*Create' 'TInfo5' © create information window object
'info' Świ 'caption' 'This information window replaces Status Bar messages'
'info' Świ 'color'204 204 255 © sets information window color
'info' Świ 'owner' '' © centers information window in workarea
'info' Świ 'Show'
'info' Świ 'caption' 'This is a small information window' © sets the information window text
'info' Świ '*Hide' © hides information window
'info' Świ 'Animate' 'Printing in progess...'200
'info' Świ '*Hide' © hides information window
'gg' Świ '*Create' 'TForm5' ('*caption' 'TInfo5 Example') ('*size'200 350) 'DemoShow' 'SessionFocus' © creates a form object
'info' Świ 'owner' 'gg' © centers information window over object gg
'info' Świ '*Set' ('width'200) ('caption' 'This is another info window') 'Show' © forces information window width to 200
'info' Świ '*Set' ('color'204 255 204) ('caption' 'New information window') © display another information window
'info' Świ 'caption' 'Third information window' © display another information window
'info' Świ 'caption' 'Fourth information window' © display another information window
'info' Świ '*Set' ('width'0) ('caption' ('Fifth information window',Śtcnl,'on several lines')) © display another information window
'info' Świ '*Set' ('width'0) ('color'204 204 255) ('delay'2) ('caption' 'Sixth information window for 2 seconds only!') © display another information window
© Note: the TInfo5 instance is best created at the start of your application
© and should remain available for you to display information messages
© on the screen throughout the application |
| parent |
Description: Get or Set the form name un which messages are to be centered (by default)
Syntax: {formname„'} 'obj' Świ 'parent' {formname}
formname: an existing APL+Win form name
Example:
'info' Świ 'parent' 'ff' |
| width |
Description: Get or Set the TInfo5 window fixed width
Syntax: {width„'} 'obj' Świ 'width' {width}
width: any width in pixels
Note: once the <width> is set to a non zero value, the TInfo5 window gets
this fixed width and its width is no longer automatically adjusted to its caption
Use a <width> of 0 to tell the TInfo5 window to start adjusting its width
to its caption again
Note: IMPORTANT:
1. the <width> property MUST always be set BEFORE the <caption> property
2. you should use <Show> after you change <width> to center the TInfo5 window
(therefore, you should always use <Show> with width 0)
Example:
'info' Świ '*Create' 'TInfo5' ('caption' 'Test') ('owner' 'ff') 'Show'
'info' Świ '*Set' ('width'300) ('caption' 'Test') 'Show'
'info' Świ '*Set' ('caption' 'This is a 300 pixels window')
'info' Świ '*Set' ('caption' 'and keeps this width until <width> is used again!')
'info' Świ '*Set' ('width'0) ('caption' 'It works fine!') 'Show'
'info' Świ '*Set' ('caption' 'and now TInfo5 adapts its width automatically') 'Show' |
|
| Description Inheritance Example Properties Methods |
| |
| Methods |
| |
|
| Animate |
Description: Displays a message with an animation on another line
Syntax: 'obj' Świ 'Animate'message character interval
message: the message to be displayed
character: the character to be used for the progress bar
interval: interval in milliseconds for the timer
Note: your application should regularly yield to Windows (using Śwgive 0 in a loop)
in order for the animation to succeed
Example:
'info' Świ 'Animate' 'Printing in progress...' |
| New |
Description: Create a new instance of TInfo5
Example:
'obj' Świ '*Create' 'TInfo5'
|
| Show |
Description: Shows the information window after centering it over the screen workarea or over its owner
Syntax: 'obj' Świ 'Show'
Note: the TInfo5 window is made topmost and is not activated (i.e. is not displayed in the Task Bar)
Example:
'info' Świ '*Create' 'TInfo5' ('caption' 'Test') ('owner' 'ff') 'Show' |
|
| Description Inheritance Example Properties Methods |
| |
|