SetCursor (ScreenField subroutine)

From m204wiki
Revision as of 19:45, 28 January 2011 by Tom (talk | contribs) (→‎SetCursor subroutine)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This method positions the cursor at the beginning of the referenced ScreenField object. An optional numeric argument positions the cursor within the field.

  %sfield:SetCursor(position)
Itemid syntax
%sfield
A reference to an instance of a ScreenField object. position A positive integral value that specifies the relative position within the object screenfield %sfield, where position 1 is the first position in the field and where the maximum width is set by the AddField method.
Usage Notes

If the position exceeds the maximum width of the field, the request is canceled.

Examples

The following sequence sets the cursor on an unprotected screenfield immediately to the right of a field with a protected “===>” command prompt:

...
%scr is object Screen
%prompt is object ScreenField
%cmd is object ScreenField
%prompt = %scr:addField(row=2, color=white, -
value='===>')