xtd 0.2.0
Loading...
Searching...
No Matches

◆ set_cursor_position()

static void xtd::console::set_cursor_position ( int32  left,
int32  top 
)
static

Sets the position of the cursor.

Parameters
leftThe column position of the cursor. Columns are numbered from left to right starting at 0.
topThe row position of the cursor. Rows are numbered from top to bottom starting at 0.
Exceptions
xtd::argument_out_of_range_exceptionThe left in a set operation is less than zero
-or-
The left in a set operation is greater than or equal to xtd::console::buffer_width
-or-
the top in a set operation is less than zero
-or-
The topo in a set operation is greater than or equal to xtd::console::buffer_height.
Remarks
Use the set_cursor_position method to specify where the next write operation in the console window is to begin. If the specified cursor position is outside the area that is currently visible in the console window, the window origin changes automatically to make the cursor visible.
The cursor automatically moves to the next character position each time a character is written to the console window. If the cursor is at the bottom right character position of the console window, the next write operation causes the console window to scroll so the cursor remains visible. If you want to write a character to the bottom right character position without causing the console window to scroll, use the move_buffer_area method to move a character to that position.