PDA

View Full Version : Loading button which is in a group


Naamloos
19th October 2001, 10:33
I have a button in a group which i want to use, how do I load it? because the group is defined before the layout...


System.getContainer("main").getLayout("normal").getObject("myfavbutton");

Francis
19th October 2001, 18:58
Originally posted by no*name
I have a button in a group which i want to use, how do I load it? because the group is defined before the layout...


System.getContainer("main").getLayout("normal").getObject("myfavbutton");


Try :

// Get the group object :
Group mygroup = System.getContainer("main").getLayout("normal").getObject("groupid");
// Get the button off the group
Button mybutton = mygroup.getObject("myfavbutton");

Francis.

Naamloos
19th October 2001, 21:02
Thanks it works!~!!!

lunarboy1
20th October 2001, 03:19
Originally posted by Francis


Try :

// Get the group object :
Group mygroup = System.getContainer("main").getLayout("normal").getObject("groupid");
// Get the button off the group
Button mybutton = mygroup.getObject("myfavbutton");

Francis.

Nice, Francis! I had the same question :).