10/02/13 17:24:16
>>701
// F#
open System.Windows.Forms
open System.Drawing
type TinyEditorForm() =
inherit Form(Text = "TinyEditor", Width = 450, Height = 150)
let labelInput = new Label(Text = "テキストを入力してください:", Left = 10, Top = 10, Width = 140)
let textboxInput = new TextBox(Left = 160, Top = 10, Width = 240)
let labelOutput = new Label(Text = "フォント変換後のテキスト:", Left = 10, Top = 50, Width = 140)
let textboxOutput = new TextBox(ReadOnly = true, Left = 160, Top = 50, Width = 240, Height = 50, Font = new Font("Helvetica", 24.f, FontStyle.Bold))
do
textboxInput.TextChanged |> Event.map (fun _ -> textboxInput.Text)
|> Event.add (fun text -> textboxOutput.Text <- text)
base.Controls.AddRange [|labelInput; textboxInput; labelOutput; textboxOutput|]
[<System.STAThread>]
do
new TinyEditorForm() |> Application.Run