Hi,
What could be reason I can not add an OptionButton to a dialog?
var userDialog = Dialogs.createNewDialogTemplate...
userDialog.OptionButton(100,100,50,50,"Radio Button");
and I don't see it.
Other buttons are present.
Thanks.
Hi,
What could be reason I can not add an OptionButton to a dialog?
var userDialog = Dialogs.createNewDialogTemplate...
userDialog.OptionButton(100,100,50,50,"Radio Button");
and I don't see it.
Other buttons are present.
Thanks.
Hi
userDialog.OptionGroup("OptGroup");
userDialog.OptionButton(10, 10, 100, 20, "1");
userDialog.OptionButton(10, 30, 100, 20, "2");
Other question:
I need to make enable = false for both option buttons and it did not work also.
userDialog.setDialogEnable("1", false);
userDialog.setDialogEnable("2", false);
The second one is enabled anyway.
Thanks.
//Главный экран интерфейса MainDialog = function() { //-------------------------------------------- this.getPages = function() { var oTmpl = Dialogs.createNewDialogTemplate(600, 400, "123"); oTmpl.OptionGroup("OptGroup"); oTmpl.OptionButton(10, 10, 100, 20, "1", "OptBtn1"); oTmpl.OptionButton(10, 30, 100, 20, "2", "OptBtn2"); //------------------------------------------- oTmpl.PushButton(10, 60, 100, 20, "Нажми меня 1", "Btn1"); oTmpl.PushButton(10, 80, 100, 20, "Нажми меня 2", "Btn2"); oTmpl.OKButton(); //oTmplMain.HelpButton("Help1"); oTmpl.CancelButton(); return [oTmpl]; } //-------------------------------------------- //Начальные настройки диалога this.init = function(aPages) { return; } this.Btn1_pressed = function( ) { var oOptBtn = this.dialog.getPage(0).getDialogElement("OptBtn1"); oOptBtn.setEnabled(!oOptBtn.isEnabled()); return; } this.Btn2_pressed = function( ) { var oOptBtn = this.dialog.getPage(0).getDialogElement("OptBtn2"); oOptBtn.setEnabled(!oOptBtn.isEnabled()); return; } this.ret=0; //-------------------------------------------- this.onClose = function(pageNumber, bOk) { if (bOk) this.ret=0; else this.ret=1; } //-------------------------------------------- //Функция формирует результат работы диалога this.getResult = function() { return; } return; } var dlg = new MainDialog(); var oRet = Dialogs.showDialog(dlg, Constants.DIALOG_TYPE_WIZARD_NONLINEAR, "123");
Hi Albina,
for a choice of several options use of a CHECKBOX will be the best choice (...OPTIONBUTTON usually used for a choice of one of several options)
Regards,
Alexander Chuvaev
Thank you very much for your fast replay.
I could not work this way because I have to correct the code of somebody else and he wrote code differently. Some other suggestions or explanations why the first way did not work?
Thanks.
Hi,
This could also be an older dialog version and not the new one. There are different methods for both... Perhaps you should post your dialog code here...