User Tools

Site Tools


prop_xorigin.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List >====== PROP:Xorigin and PROP:YOrigin ====== Previous pageReturn to chapter overviewNext page

(how much a window or control has been scrolled)

Attributes of a SHEET, IMAGE, or LIST control (which have horizontal and/or vertical scrollbar(s)) that sets or retrieves how much the control has been scrolled. XORIGIN (PROP:XOrigin) specifies how much the control has scrolled in the X direction. YORIGIN (PROP:YOrigin) specifies how much the control has scrolled in the Y direction. As the example shows below, these properties are also valid on a WINDOW.

This property returns the value that CHOICE( ) would return for the first visible row of a referenced list box. This property allows you to calculate the current position of the highlighted row, (e.g. CHOICE(?List) - ?List{PROP:YOrigin} + 1)

You can also set this property using the following syntax:

?List {PROP:YOrigin} = n

where n is the topmost visible row to scroll the list box to. The runtime library will then adjust the given value to show as many rows as possible. For example, if

n + (?List{PROP:Items} - 1) > ?List{PROP:LineCount}, n is changed to ?List{PROP:LineCount} - (?List{PROP:Items} - 1)

If n <;= 0, n is changed to 1.

Example

PROGRAM

MAP

END

S STRING(20)

Window WINDOW('Caption'),AT(,,400,250),FONT('MS Sans Serif',8,,FONT:regular)|

                       ,IMM,VSCROLL, STATUS,SYSTEM,GRAY,CENTER

       ENTRY(@S20),AT(10,100),USE(S,,?S1),SCROLL

       ENTRY(@S20),AT(10,500),USE(S,,?S2),SCROLL

       ENTRY(@S20),AT(10,900),USE(S,,?S3),SCROLL

      END

y1      UNSIGNED

y2      UNSIGNED

Wy1     UNSIGNED

Wy2     UNSIGNED

prop_xorigin.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1