|
Scrollbar control help
Function help:
Real API_Scrollbar_Create (Real Parent Handle, Real X, Real Y, Real Width, Real Height, Real Style Flags, Real Extended Style Flags);
This function creates a new scrollbar control.
Argument list:
(0) Parent Handle: Identifies the window handle of the window to create this control on.
(1) X: The horizontal position of the control in pixels, relative to the parent window.
(2) Y: The vertical position of the control in pixels, relative to the parent window.
(3) Width: The horizontal size of the control in pixels.
(4) Height: The vertical size of the control in pixels.
(5) Style Flags: The style flags, supports the Global Control Styles and the following styles:
SBS_BOTTOMALIGN
Aligns the bottom edge of the scroll bar with the bottom edge of the rectangle defined by argument0,argument1,argument2 and argument3.
SBS_HORZ
Designates a horizontal scroll bar. If neither the SBS_BOTTOMALIGN nor SBS_TOPALIGN style is specified, the scroll bar has the height, width, and position specified by argument0,argument1,argument2 and argument3.
SBS_LEFTALIGN
Aligns the left edge of the scroll bar with the left edge of the rectangle defined by argument0,argument1,argument2 and argument3.
SBS_RIGHTALIGN
Aligns the right edge of the scroll bar with the right edge of the rectangle defined by argument0,argument1,argument2 and argument3.
SBS_SIZEBOX
Designates a size box.
SBS_SIZEBOXBOTTOMRIGHTALIGN
Aligns the lower right corner of the size box with the lower right corner of the rectangle specified by argument0,argument1,argument2 and argument3.
SBS_SIZEBOXTOPLEFTALIGN
Aligns the upper left corner of the size box with the upper left corner of the rectangle specified by argument0,argument1,argument2 and argument3.
SBS_SIZEGRIP
Same as SBS_SIZEBOX, but with a raised edge.
SBS_TOPALIGN
Aligns the top edge of the scroll bar with the top edge of the rectangle defined by argument0,argument1,argument2 and argument3.
SBS_VERT
Designates a vertical scroll bar. If you specify neither the SBS_RIGHTALIGN nor the SBS_LEFTALIGN style, the scroll bar has the height, width, and position specified by argument0,argument1,argument2 and argument3.
Style flags can be separated by a bitwise or '|' operator.
(6) Extended Style Flags: This can be any combination of the Global Extended Control Styles.
Return value:
If this function succeeds, it returns the Control ID of the control, otherwise it returns 0.
Real API_Scrollbar_Enable ( Real Control ID, Real Arrow Flags)
This function enables or disables parts of a scrollbar.
Arrow flags:
ESB_DISABLE_BOTH
Disables both arrows on a scroll bar.
ESB_DISABLE_DOWN
Disables the down arrow on a vertical scroll bar.
ESB_DISABLE_LEFT
Disables the left arrow on a horizontal scroll bar.
ESB_DISABLE_LTUP
Disables the left arrow on a horizontal scroll bar or the up arrow of a vertical scroll bar.
ESB_DISABLE_RIGHT
Disables the right arrow on a horizontal scroll bar.
ESB_DISABLE_RTDN
Disables the right arrow on a horizontal scroll bar or the down arrow of a vertical scroll bar.
ESB_DISABLE_UP
Disables the up arrow on a vertical scroll bar.
ESB_ENABLE_BOTH
Enables both arrows on a scroll bar.
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Real API_Scrollbar_GetPos ( Real Control ID)
This function returns the current position in a scrollbar.
Return value:
Returns the current position.
Real API_Scrollbar_SetPos ( Real Control ID, Real Position)
This function sets the current position in a scrollbar.
Return value:
If the function succeeds, the return value is the previous position of the scroll box, otherwise it's zero (0).
Real API_Scrollbar_SetRange ( Real Control ID, Real Min, Real Max, Real Pages)
This function sets the range of a scrollbar.
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Real API_Scrollbar_Show ( Real Control ID, Real Is Shown)
This function shows (argument1 is set to 1) or hides (argument1 is set to 0).
Return value:
If this function succeeds, it returns true (1), otherwise it returns false (0).
Example code:
Scrollbar1 = API_Scrollbar_Create (Tab,10,425,175,15,SBS_HORZ);
API_Scrollbar_Enable (Scrollbar1,ESB_ENABLE_BOTH);
API_Scrollbar_SetRange (Scrollbar1,0,1000,10);
API_Scrollbar_SetPos (Scrollbar1,50); //
|
is
Return to help index
|
|