up with PyGUI!

Ed Leafe ed at leafe.com
Thu Sep 23 17:03:44 EDT 2004


On Sep 23, 2004, at 6:44 AM, anton muhin wrote:

> I beg your pardon for possibly stupid comment---I haven't practice GUI 
> programming for a long time, especially in Python. However I mostly 
> prefer declarative approach for the problems like that. Therefore, 
> wouldn't it be interesting to describe the structure with class and 
> metaclass mechanism, like:
>
> class MainFrame(FrameDescription):
>
>   class b1(ButtonDescription):
>     size = (40, 40)
>     text = "b1"
>
> etc.

	That's the approach we've take with Dabo (albeit with slightly 
different names). In fact, you could even avoid setting the size with a 
tuple by typing:

	class b1(dabo.ui.dButton):
		Height = 60
		Width = 40
		Caption = "Click Me"

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://dabodev.com/




More information about the Python-list mailing list