Results 1 to 6 of 6

Thread: How I can add option button on option group?

  1. #1
    Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    94

    How I can add option button on option group?

    I define the object ui_group as optiongroup with 5 buttons, but I dont know how I can define the buttons.

    ui_cont_group.addobject("ui_group", "Optiongroup");
    ui_group.fixedwidth = 600;
    ui_group.caption = "Group";
    ui_group.buttoncount = 5;
    ui_group.value = 2;

  2. #2
    Lianja MVP
    Join Date
    Feb 2012
    Location
    Berea, KY, USA
    Posts
    2,184
    Hi Jefferson,

    Try this:

    ui_group.buttons(1).caption = "First button";

    I haven't done this code, but the Docs page on optiongroups, https://www.lianja.com/doc/index.php/Optiongroup, says there is a buttons collection, so the chances are this will work.

    Hank

  3. #3
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,159
    Blog Entries
    22
    Optiongroups contain optionbuttons.

    https://www.lianja.com/doc/index.php/Optionbutton

    Use the addobject() method of optiongroup to add optionbuttons.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  4. #4
    Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    94
    Hi Hank and Barry!
    Work with ui_group.buttons(1).caption = "First button";

    and return error using addobject().

    Name:  Screenshot from 2022-08-24 00-15-50.jpg
Views: 98
Size:  66.4 KB
    Name:  Screenshot from 2022-08-24 00-15-50.jpg
Views: 98
Size:  66.4 KB

  5. #5
    Member
    Join Date
    Feb 2012
    Location
    São Paulo - Brasil
    Posts
    94
    Name:  Screenshot from 2022-08-24 00-15-16.jpg
Views: 154
Size:  71.9 KB

  6. #6
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,159
    Blog Entries
    22
    Sorry you are correct. I have corrected this and updated the documentation page.

    https://www.lianja.com/doc/index.php/Optiongroup
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us