SetCursor (ScreenField subroutine): Difference between revisions

From m204wiki
Jump to navigation Jump to search
mNo edit summary
 
Line 11: Line 11:


<tr><th>position</th>
<tr><th>position</th>
<td>A positive integral value that specifies the relative position within the <var class="term">sfield</var> object, where position 1 is the first position in the field and the maximum width was set by the <var>[[AddField_(Screen_function)|AddField]]</var> method.</td></tr>
<td>A positive integral value that specifies the relative position within the <var class="term">sfield</var> object, where position 1 is the first position in the field, and the maximum width was set by the <var>[[AddField_(Screen_function)|AddField]]</var> method.</td></tr>
</table>
</table>



Latest revision as of 20:07, 20 November 2012

Set or return the value of a screenfield (ScreenField class)

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

Syntax

sfield:SetCursor[( [position])]

Syntax terms

sfield A reference to an instance of a ScreenField object.
position A positive integral value that specifies the relative position within the sfield object, where position 1 is the first position in the field, and the maximum width was set by the AddField method.

Usage notes

  • If the position value 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='===>') %cmd = %scr:addField(protected=false, - width=%scr:columns - 15, color=green) %cmd:setcursor ...

See also