Re: How to use checkBox ?



2012/9/17 alok barsode <alokbarsode gmail com>:
> hi,
>
> I want to use checkbox is a modal dialog. Here is what i am doing :
>
> const checkbox = imports.ui.checkBox;
>
> <in the modal dialog i do>
>
> this.check = new checkbox.CheckBox();
> this.check.setLabel('Label1');
> messageBox.add(this.check);

messageBox.add(this.check.actor);

> messagebox is a St.BoxLayout and all the other components which are added to
> it are working correctly.
>
> how do i use a checkbox?

Look at the code, it's pretty straightforward.

> none of the javascript ui files are using it (so i could use it as
> reference). is it deprecated?

It's used by the keyring prompter (js/ui/components/keyring.js in master)

Giovanni


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]