returning radiobox individual button positions?

3 views
Skip to first unread message

CRGr

unread,
Dec 1, 2011, 2:34:05 PM12/1/11
to jsLINB
Is there a way to get the positions of the individual buttons within a
RadioBox after it has been created?
Help much appreciated.
Thanks!

-crg

JustGo

unread,
Dec 1, 2011, 7:32:01 PM12/1/11
to jsLINB
Class('App', 'linb.Com',{
Instance:{
iniComponents : function(){
// [[code created by jsLinb UI Builder
var host=this, children=[], append=function(child)
{children.push(child.get(0))};

append(
(new linb.UI.SButton)
.setHost(host,"ctl_sbutton1")
.setLeft(110)
.setTop(280)
.setCaption("click me")
.onClick("_ctl_sbutton1_onclick")
);

append(
(new linb.UI.RadioBox)
.setHost(host,"ctl_radiobox1")
.setItems([{"id":"a", "caption":"item a"}, {"id":"b",
"caption":"item b"}])
.setLeft(70)
.setTop(120)
.setValue("a")
);

return children;
// ]]code created by jsLinb UI Builder
},
_ctl_sbutton1_onclick : function (profile, e, src, value) {
var rootNode = this.ctl_radiobox1.getRoot(),
itemNode = this.ctl_radiobox1.getSubNode('ITEM','b');

linb.message(_.serialize(itemNode.offset()));
linb.message(_.serialize(itemNode.offset(null,
rootNode)));
}
}
});

CRGr

unread,
Dec 3, 2011, 7:52:06 PM12/3/11
to jsLINB
Thanks for the tip! I'll give it a shot.
Reply all
Reply to author
Forward
0 new messages