CursorMargin
CursorMargin Xpos
 
Parameters:

    Xpos = The X coordinate of where the print cursor should return to
Returns: NONE
 

CursorMargin sets the print cursors left most return margin. This is used for successve print commands, so rather than the print cursors X position always being reset to zero after a print command, it's position will be set to your margin value.



FACTS:


* The CursorMargin only effects the X coordinate of the print cursor.



Mini Tutorial:


This example displays the text "Hello World" to the screen using print. These messages will be drawn at the default print cursor position of 0x,0y from the top left hand corner of the screen down. After each message is drawn with the print command, the print cursor is repostion to the start of the next line.

However once CursorMargin is set, then all following printed text will be drawn at the next margin position, rather than it's default.


  
  
; Display some messages to the screen
  Print "Hello World"
  Print "Hello World"
  Print "Hello World"
  
  
; Set the Cursor Margin To 100
  CursorMargin 100
  
; Display some messages to the screen
  Print "Hello World"
  Print "Hello World"
  Print "Hello World"
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  




This example would output something like this to the screen.

  
  Hello World
  Hello World
  Hello World
  Hello World
  Hello World
  Hello World
  

 
Related Info: CursorLineFeed | GetCursorLineFeed | GetCursorMargin | GetCursorX | GetCursorY | Print | SetCursor | SetCursorX | SetCursorY :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com