Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

hiSetScrollBarValue

hiSetScrollBarValue(
g_formOrScrollRegion
l_newValues
)
=> l_values

Description

Sets the horizontal and vertical scroll bars in a form or scroll region field to the position you specify, therefore allowing you to display a specific part of the form or scroll region field programmatically. Use hiGetScrollBarInfo to get information about the form or scroll region field before you use this function.

Arguments

g_formOrScrollRegion

Handle to the form or scroll region field.

l_newValues

The new values, in pixels, for the scroll bars. Use the following syntax for l_newValues:

list ( [ nil | x_horzValue] [nil | x_vertValue ] )

The first element of the list is the new pixel value for the horizontal scroll bar or nil to leave the horizontal scroll bar position unchanged. The second element of the list is the new pixel value for the vertical scroll bar or nil to leave the scroll bar position unchanged.

To get the minimum and maximum limits for x_horzValue and x_vertValue, use the hiGetScrollBarInfo function. The minimum value is usually 0. The maximum value is the size of the form or scroll region field minus the slider size (the visible part of the form or scroll region field).

If you provide a value that is less than the minimum, the miniumum value is used. If you provide a value that is more than the maximum (the size of the form or scroll region field minus the slider size), the maximum value is used.

If the vertical or horizontal scroll bar is not visible, the new value for that scroll bar is not set.

Value Returned

l_values

The scroll bar values in the following form:

list ( [ nil | x_newHorzValue ] [ nil | x_newVertValue ] )

The first element of the list is the new position of the horizontal scroll bar or nil if the scroll bar is not visible. The second element of the list is the new position of the vertical scroll bar or nil if the scroll bar is not visible.

Related Topics

Form and Field Functions

hiGetScrollBarInfo


Return to top
 ⠀
X