Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- ClipOn 3.0 Reference - c_bar() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 C_BAR()

 DESCRIPTION

 C_BAR() displays and manages a scroll bar on the screen for either
 a vertical or horizontal orientation bar.  The movement of the bar
 is based on a total and an offset which are specified as arguments.
 The location, length, and color of the bar are also specified as
 arguments.

 NOTES

 The first call to C_BAR() must be made with the first 5 parameters
 only.  This will allow the function to draw the bar on the screen
 to the proper size.  All subsequent calls to C_BAR() must be made
 with all parameters, except prev_position which is optional.

 SYNTAX

 C_BAR(st_row, st_col, length, orientation, color [,position, max_position]
 [,prev_position])

 PARAMETERS

 st_row (N), st_col (N) are the starting row and column where the
 bar appears.  For a vertical bar, st_row is the top of the bar.
 For a horizontal bar, st_col is the left side of the bar.

 length (N) is the length of the bar specified as rows or columns
 depending on the orientation.

 orientation (N) is specified as 0 for a vertical bar and 1 for a
 horizontal bar.

 color (C) is the color that the bar should appear on the screen
 specified as a Clipper color string.  The reverse of the color
 specified is used for the beginning and ending arrows.

 position (N) is the current location where the item appears as
 related to max_position.  For example, if C_BAR() were used to
 measure the progress of an array of 100 elements, the first array
 element would be position 1, array element 50 would be position 50,
 and array element 100 would be position 100.

 max_position (N) is the maximum number of items that are being
 measured with C_BAR().  For example, if an array has 50 elements
 max_position is 50.  If a database has 200 records being displayed
 then max_position is 200.

 prev_position (N) is the position that C_BAR() returned from an
 earlier call to the function.  This optional parameter is used to
 help stabilize the C_BAR() movement for smoother scrolling.

 RETURNS

 C_BAR() returns the current position of the bar which can be used
 in the next call to C_BAR() to help stabilize the movement of the
 bar.

 EXAMPLES

 c_bar(10,40,10,0,"W/B")                   && draws initial bar on the screen
 pos = c_bar(10,40,10,0,"W/B",1,100)       && puts the bar at the top
 pos = c_bar(10,40,10,0,"W/B",50,100,pos)  && puts bar in middle


See Also: C_PICK()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson