Thread Rating:
  • 308 Vote(s) - 2.73 Average
  • 1
  • 2
  • 3
  • 4
  • 5
大文字・小文字変換
12-20-2012, 11:49 AM,
#1
大文字・小文字変換
テキストフィールドに入力された文字を大文字に一括変換したいのですが、
どうすればよいですか?
12-20-2012, 12:46 PM,
#2
RE: 大文字・小文字変換
String.to-upper-clone メソッドを利用すればできます。
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}
                }
            }
        }
    }
}



Forum Jump:


Users browsing this thread:

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('671')