Mailinglist Archive: yast-devel (55 mails)

< Previous Next >
Re: [yast-devel] Libyui How to use RadioButton and RadioGroupButton
2011/3/28 Manu Gupta <manugupt1@xxxxxxxxx>:
Thanks..  It worked

Now I am trying to dynamically insert items but it seems that it does
not work.. can you have a look at it.

I have tried to options

1. Calling dialog->recalcLayout() and then inserting a YLable
2. Inserting a label and then calling dialog->recalcLayout()


2011/3/28 Josef Reidinger <jreidinger@xxxxxxx>:
Manu Gupta write:
Hi All

I have been trying to use RadioButton and RadioButtonGroup using
libyui but I am unable to do so Can anyone have a look at my code and
tell me how do I do it?


Hi,
at first thanks for feedback. At second I want to note that I am not author
of libyui and I just fix your code by looking in documentation and source
code.

Mistake you do is that addRadioButton should be called only in constructor
by documentation, but when I look in code it doesn't use at all. Actually
RadioButton detect its group just by searching its parents and match first
radioButtonGroup ( Yes, I also think that it is not perfect solution ).

So I attached modified your code which actually works.

Conclusion:
RadioButton use first RadioButtonGroup which it find as its parent.

Josef



--
Josef Reidinger
Appliance Toolkit team
maintainer of perl-Bootloader and parts of webyast and SLMS
author of rubygems - studio_api and net_observer (coauthor)




--
Regards
Manu Gupta




--
Regards
Manu Gupta
< Previous Next >
List Navigation