12-20-2012, 11:49 AM
12-20-2012, 12:46 PM
String.to-upper-clone メソッドを利用すればできます。
MenuButton のサンプルを追記しておきます。
MenuButton のサンプルを追記しておきます。
Code:
{value
let tf:TextField = {TextField}
{MenuButton
takes-focus? = false,
tf,
{MenuAction
label = "To Upper",
key-accel-string = "Ctrl+U",
{on Action do
{if-non-null str = tf.value then
set tf.value = {str.to-upper-clone}
}
}
},
{MenuAction
label = "To Lower",
key-accel-string = "Ctrl+L",
{on Action do
{if-non-null str = tf.value then
set tf.value = {str.to-lower-clone}
}
}
}
}
}