xtd.console - Reference Guide  0.0.1
Modern c++17 library to manage terminal on Windows, macOS and Linux.

§ cursor_top() [2/2]

template<class Char >
static bool xtd::basic_console< Char >::cursor_top ( int  top)
inlinestaticnoexcept

Sets the row position of the cursor within the buffer area.

Parameters
topThe current position, in rows, of the cursor.
Returns
true if cursor top changed; otherwise false.
Example
This example demonstrates the cursor_left and cursor_top properties, and the set_cursor_position and clear methods. The example positions the cursor, which determines where the next write will occur, to draw a 5 character by 5 character rectangle using a combination of "+", "|", and "-" strings. Note that the rectangle could be drawn with fewer steps using a combination of other strings.