Small Basic > TextWindow(テキスト ウィンドウ)
のぶ亭『プログラミングの相談窓口』 … 様々なプログラミング問題を個別対応致します |
TextWindow(テキスト ウィンドウ)
TextWindow はテキスト関連の入出力機能を提供(テキスト ベースの text window からテキストや数値の読み書きができる)
属性(Properties)
プロパティ
構文
内容
ForegroundColor
TextWindow.ForegroundColor
Text window に出力されるテキストの表示色を取得または設定
BackgroundColor
TextWindow.BackgroundColor
Text window に出力されるテキストの背景色を取得または設定
CursorLeft
TextWindow.CursorLeft
Text window 上のカーソルのカラムの位置を取得または設定
CursorTop
TextWindow.CursorTop
Text window 上のカーソルの行の位置を取得または設定
Left
TextWindow.Left
Text window の左の位置を取得または設定
Title
TextWindow.Title
Text window のタイトルを設定または取得
Top
TextWindow.Top
Text window の上の位置を設定または取得
オペレーション(Operations)
メソッド
構文
内容
Show
TextWindow.Show()
Text window を表示
Returns Nothing
Hide
TextWindow.Hide()
text window を非表示にする
Returns Nothing
Clear
TextWindow.Clear()
TextWindow をクリアする
Returns Nothing
Pause
TextWindow.Pause()
返る前にユーザーの入力を待つ
Returns Nothing
PauseIfVisible
TextWindow.PauseIfVisible()
ユーザーの入力を待つ(TextWindow がすでに開かれている場合のみ)
Returns Nothing
PauseWithoutMessage
TextWindow.PauseWithoutMessage()
返る前にユーザーの入力を待つ
Returns Nothing
Read
TextWindow.Read()
text window からテキストを読み取る(ENTER キーを押すまで何も返されない)
Returns text window から読み取られたテキスト
ReadNumber
TextWindow.ReadNumber()
text window から数値を読み取る(ENTER キーを押すまで何も返されない)
Returns Text window から読み取られた数値
WriteLine
TextWindow.WriteLine(data)
テキストまたは数値を text window に書き込む(行末に改行文字が追加され、次回 text
window に書き込みが行われたときには、新しい行から始まるようになる)
data text window に書き込まれるテキストまたは数値
Returns Nothing
Write
TextWindow.Write(data)
テキストまたは数値を text window に書き込む(行末に改行文字が追加され、次回 text
window に書き込みが行われたときには、新しい行から始まるようになる)
data text window に書き込まれるテキストまたは数値
Returns Nothing
TextWindow.ForegroundColor = "black"
TextWindow.Title = "カーソルテスト"
no = 1
For y = 1 To 20 Step 2
For x = 1 To 70 Step 6
TextWindow.CursorTop = y
TextWindow.CursorLeft = x
TextWindow.Write(no)
no = no + 1
EndFor
EndFor
TextWindow.WriteLine("")