1
panel(name:"Reference Name") {
        label("Select XML field for reference name:", constraints:gbc(gridx:0,gridy:0, anchor:WEST))
        comboBox(id:"refNameSelectBox",items:displayNameOptions, constraints:gbc(gridx:0,gridy:1,ipadx:20, anchor:WEST))
        label("Before:", constraints:gbc(gridx:0, gridy:2, anchor:WEST))
        textField(id:"refBeforeText", text:"taco", constraints:gbc(gridx:1,gridy:2,ipadx:30, gridwidth:REMAINDER, anchor:WEST))
        label("After:", constraints:gbc(gridx:0, gridy:3, anchor:WEST))
        textField(id:"refAfterText", text:bind(source:dispBeforeText, sourceProperty:'text'), constraints:gbc(gridx:1,gridy:3,ipadx:30,gridwidth:REMAINDER,anchor:WEST))
        checkBox(id:"refSpaceUnder",text:"Replace spaces with _", constraints:gbc(gridx:0,gridy:1,gridwidth:REMAINDER,anchor:WEST))
        checkBox(id:"refNoSpecials",text:"Remove Special Characters", constraints:gbc(gridx:0,gridy:2,gridwidth:REMAINDER,anchor:WEST))
    }

ユーザーにテキスト操作のプレビューを提供しようとしています。現在、テキストをコピーするだけの refBeforeText にバインドされた refAfterText があります。最後の 2 つのチェックボックスを使用して、テキストを変更したいと考えています。両方のチェックボックスをオンにすると、refBeforeText が「I have a Taco!」から変更されます。refAfterText の「I_have_a_Taco」に。

4

0 に答える 0