[−][src]Function winconsole::console::scroll_to
pub fn scroll_to(position: u16, vertical: bool) -> WinResult<()>
Scrolls the console window to the specified position, in character cells. If the specified position is greater than the maximum scroll position, the window is scrolled to the maximum position.
Arguments
position
- The position to scroll to.vertical
- Should the window scroll vertically, or horizontally?
Examples
Scrolls to the top of the window.
console::scroll_to(0, true).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.