Copy link to clipboard
Copied
Hii all
myW.pannel_ePub.buildBtn_OK = myW.pannel_ePub.add('button', [40,115,100,65], 'Ok',{name:'ok'});
myW.pannel_ePub.buildBtn_Cancel = myW.pannel_ePub.add('button', [120,115,190,65], 'Cancel',{name:'cancel'});
Where are these lines wrong?
Buttons are not getting created.
Please help
Thanks
Copy link to clipboard
Copied
I think they are there but you can't see them.
You are using absolute location+size values.
It would be advised to use instead, absolute location and relative size.
Try this:
myW.pannel_ePub.buildBtn_OK = myW.pannel_ePub.add('button', [40,115,undefined,undefined], 'Ok',{name:'ok'});
myW.pannel_ePub.buildBtn_OK.size = [100,65];
myW.pannel_ePub.buildBtn_Cancel = myW.pannel_ePub.add('button', [120,115,undefined,undefined], 'Cancel',{name:'cancel'});
myW.pannel_ePub.buildBtn_Cancel.size = [190,65];
Hope it helps!
Copy link to clipboard
Copied
Hi,
Try this code..
var myW = new Window('dialog', 'Test');
var pannel_ePub=myW.add('panel',undefined, 'Pannel_ePub');
var buildBtn_OK = pannel_ePub.add("button",undefined, 'Ok');
var buildBtn_Cancel = pannel_ePub.add("button",undefined, 'Cancel');
(or)
var myW = new Window('dialog', 'Test');
var pannel_ePub=myW.add('panel',undefined, 'Pannel_ePub');
var Btn= pannel_ePub.add("group");
var buildBtn_OK = pannel_ePub.add("button",undefined, 'Ok');
var buildBtn_Cancel = pannel_ePub.add("button",undefined, 'Cancel');