Link Search Menu Expand Document

TextBox.SetIMECompObject Method

Explanation A method for specifying a TextBox object that receives IME input and using the key input passed to IME. With this method, it is possible to identify the ruby of kanji.

Executes a method from a TextBox (or its derived class) object that receives IME input and automatically fills another TextBox object in the specified display format.

Input to the auto-filled object follows IME input. Even if it is converted to alphabetic characters, it will be entered exactly as you entered the key. (Example: "aiu"-> "アイウ") To input alphabets, it is necessary to disable IME of the IME input object.

Editing on the input character string after the IME input is confirmed is not reflected in the auto-input target object. The new IME input after confirmation is additionally input to the object to be automatically input. If the IME input object is cleared, the auto-input target object is also cleared.

When a Touch event occurs on an IME input object, the Touch event also occurs on the object to be automatically input.

Autofill is controlled by the properties of the IME input object as follows:
1. If the Format property is specified, autofill will also be displayed in the format according to that Format property.
2. The InputMode and MaxLength properties are valid. The following is an example when IME is entered as "東京都豊島区東池袋1-23-4".
InputMode MaxLength Conversion input
$ DKANA Unspecified トウキョウトトシマクヒガシイケブクロ
$ DKANA + $ DNUMERIC Unspecified トウキョウトトシマクヒガシイケブクロ1234
$ DKANA 10 トウキョウ
Added since Ver.4.0.3
Not supported in Mobile, AI
Call format TextBox1.SetIMECompObject( obj [, mode [, showRealtime ] ] )
Return value None
Arguments TextBox obj TextBox object for auto-input
You can specify a TextBox (or its derived class). If null is specified, the setting will be canceled.
integer mode Display format
$ KANA: Half-width Katakana
$ DKANA: Full-width Katakana
$ DHIRA: Full-width Hiragana
The default is $ DKANA. Key input such as numbers and symbols is not omitted.
boolean showRealtime Real-time execution control of auto-input
$ FALSE: Convert only when IME is confirmed
$ TRUE: IME input is automatically input in real time
Exception PKG-54 No valid TextBox object specified
Example of use
    TextBox TextBoxShow {  /* 自動入力用 */
        X = 8;
        Y = 140;
        Width = 136;
        Height = 24;
    }
    TextBox TextBox1 {  /* IME入力用 */
        X = 8;
        Y = 40;
        Width = 136;
        Height = 24;
        IMEMode = $DHIRA;
        SetIMECompObject(^.TextBoxShow, $DKANA, $TRUE);
    }
    
Related item