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))
    }

我试图让用户预览一些文本操作。现在,我将 refAfterText 绑定到 refBeforeText,它只是复制文本。我想使用最后两个复选框来更改文本。选中这两个框会将 refBeforeText 更改为“我有一个 Taco!” 到 refAfterText 中的“I_have_a_Taco”。

4

0 回答 0