ラジオボタンの実装に問題があります。CS2のラジオボタンが問題になる可能性があることは知っていますが、どこが間違っているのかわかりません。間違った場所に角かっこまたはカンマがあるのではないかと思います。しかし、それを見ることができません。ありがとうございました。
var dlg =
"dialog {text:'Script Interface',bounds:[100,100,300,260]," +
"info: Group { orientation: 'column', alignChildren: 'center'," +
"radiobutton0:RadioButton {bounds:[50,30,150,40] , text:'layerName0', alignment: 'left' }," +
"radiobutton1:RadioButton {bounds:[50,50,150,90] , text:'layerName1', alignment: 'left' }}" +
"cancelBTN:Button{bounds:[110,130,190,150] , text:'Cancel' },"+
"processBTN:Button{bounds:[10,130,90,150] , text:'Ok' }}";
var win = new Window(dlg,"radio buttons");
win.radiobutton0.value = true;
win.center();
win.show();
別のこと:この形式はかなり醜いので、UI要素を書くためのより良い方法はありますか?
これが機能する必要最低限のコードです。var dialogBox = "dialog {orientation:'column'、alignChildren:'center'、\ info:Group {orientation:'column'、alignChildren:'center'、\ rbtn1:RadioButton {text:'Radio Button 1'、align: 'left'}、\ rbtn2:RadioButton {text:'Radio Button 2'、align:'left'}、}、}、\}} ";
win = new Window (dialogBox);
win.center();
win.show();
ラジオボタンの切り替えは3行目で制御されていると思います。コメントアウトすると、ラジオボタンが正しく機能しなくなります。