[−][src]Function winconsole::console::scroll_by
pub fn scroll_by(amount: i16, vertical: bool) -> WinResult<()>
Scrolls the console window by the specified amount relative to its current position, in character cells. If the resultant position is greater than the maximum scroll position, the window is scrolled to the maximum position.
Arguments
amount
- The amount to scroll by.vertical
- Should the window scroll vertically, or horizontally?
Examples
Scrolls down 5 rows.
console::scroll_by(5, true).unwrap();
Errors
InvalidHandleError
: Returned if an invalid handle to the console output is retrieved or used.IoError
: Returned if an OS error occurs.