| Example |
var btn = pseudo.ToggleButton.create(this, "btn", 1);
btn.setSize(100, 20);
//Apply the skin to the button
btn.setLook(pseudo.look.XPLook.getInstance());
//Here we add a label to the button, what is a little bit tricky
var lbl:pseudo.Label = pseudo.Label(btn.addItem(pseudo.Label));
lbl.setAlign("center");
lbl.setText("XP Button");
//Calling these functions will finally draw the component
btn.update();
btn.draw();
// similar the the code above we create a check box,
// with the only difference, you should call the
// method setData for this instance of the button and
// pass an instance of the Object having the flag "type" set to "checkbox"
var btnCheckBox = pseudo.ToggleButton.create(this, "btnCheckBox", 8);
btnCheckBox.setLook(pseudo.look.XPLook.getInstance());
btnCheckBox.setSize(100, 20);
var lbl1:pseudo.Label = pseudo.Label(btnCheckBox.addItem(pseudo.Label));
lbl1.setText("Check Box");
//call the method setData for this instance of the button
// and pass an instance of the Object having the flag "type" set to "checkbox"
btnCheckBox.setData({type:"checkbox"});
btnCheckBox._y = btn._y +100;
btnCheckBox.update();
btnCheckBox.draw();
// This code will draw the buttons using XP look and feel skin.
// Please notice that you should always use some skin to create the component,
// this can be done like in this example, and the skin will be complied into the swf file,
// or you can use another technique and load the skin at a run time.
|