Microsoft Small Basic
Program Listing: MDP504
' TextBox Sample
' Version 0.1 - using a button
' Copyright © 2016 Nonki Takahashi. The MIT License.
GraphicsWindow.Title = "TB 0.1"
Init()
Sub Init
GraphicsWindow.Width = 220
GraphicsWindow.Height = 100
GraphicsWindow.BrushColor = "Black"
tbox = Controls.AddTextBox(10, 10)
Controls.AddButton("OK", 180, 8)
shp = Shapes.AddText("")
Shapes.Move(shp, 10, 40)
Controls.ButtonClicked = OnButtonCLicked
EndSub
Sub OnButtonClicked
txt = Controls.GetTextBoxText(tbox)
Shapes.SetText(shp, "Hello, " + txt + "!")
EndSub