[Sugar-devel] Proper use of self.set_canvas function

Tomeu Vizoso tomeu at sugarlabs.org
Sun Jul 19 08:10:14 EDT 2009

On Sun, Jul 19, 2009 at 14:06, sumit singh<sumit.coder at gmail.com> wrote:
> Hi everyone,
> I would like to discuss about the set_canvas function of the
> activity.Activity class, I can understand that it is used to define the
> current working area of our activity. But , I want something of the sort
> that when I start my activity the current working area would be a
> gtk.scrollingwindow from which the user can select from the available
> options and then when he clicks on a particular option , the current working
> area should become a gtk.Vbox containing other widgets where the actual game
> will be played. Now, when the user again wants to select from the available
> game options, the current working area should become the gtk.Scrollingwindow
> and so on...
> So, should everytime I be using the set_canvas method in order to switch b/w
> the 2 states or is there any other option.

Using set_canvas for that sounds good to me, you could as well use a
gtk.Notebook whose tabs are invisible, but I don't see any advantage
when comparing to just use set_canvas().



> Regards,
> sumit.
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel

More information about the Devel mailing list