4D v14.3OBJECT SET SCROLL POSITION |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
OBJECT SET SCROLL POSITION
OBJECT SET SCROLL POSITION
The OBJECT SET SCROLL POSITION command allows scrolling the contents of several types of objects: the lines of a subform, of a list form (displayed using the MODIFY SELECTION, DISPLAY SELECTION commands), or of a hierarchical list, the rows and columns of a list box or even the pixels of a picture. Note: Scrolling via programming remains possible even if scrollbars have been hidden in the form. If you pass the first optional * parameter, you indicate that the object parameter is the name of a subform, a hierarchical list, a list box object or a picture field/variable (in this case, pass a string in object). If you do not pass anything in this parameter, you indicate that the object parameter is a table (list form table or subform table), a variable (ListRef of a hierarchical list or list box or picture) or a field. The vPosition parameter can be used to specify the number of the row to display or, in the case of a picture, the vertical coordinate of the pixel to display.
The hPosition parameter can be used in the context of a list box or a picture.
If you pass the second optional * parameter:
Note: The HIGHLIGHT RECORDS command features an optional * parameter that allows delegating scroll management to the OBJECT SET SCROLL POSITION command. This example illustrates the difference in the way the command functions depending on whether the list box is displayed in standard or hierarchical mode: OBJECT SET SCROLL POSITION(*;"mylistbox";4;2;*) // displays 4th row of 2nd column of list box in the first position If this statement is applied to a list box displayed in standard mode: ... the rows and columns of the list box actually scroll: On the other hand, if the same statement is applied to a list box displayed in hierarchical mode, the rows scroll but not the columns because the 2nd column is part of the hierarchy: You want to scoll a picture that is included in a form variable. This montage shows the visible part of the picture as well as the point to be displayed (166 pixels vertically and 200 pixels horizontally):
To scroll the visible part and display the red point at the origin of the picture variable, you can just write: OBJECT SET SCROLL POSITION(*;"myVar";166;200;*) You then get the following result: Make sure that you do not omit the second * parameter in this case, otherwise the picture will not scroll because the point defined is already displayed. |
PROPERTIES
Product: 4D
HISTORY
Modified: 4D v11 SQL SEE ALSO
HIGHLIGHT RECORDS ARTICLE USAGE
4D Language Reference ( 4D v12.4) Inherited from : SCROLL LINES ( 4D v11 SQL Release 6) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||