• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Button creation

Guest
Jun 14, 2016 Jun 14, 2016

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

TOPICS
Scripting

Views

224

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 14, 2016 Jun 14, 2016

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 14, 2016 Jun 14, 2016

Copy link to clipboard

Copied

LATEST

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');

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines