[pygtk] Port of a gtk date entry widget

Fabian Sturm f at rtfs.org
Sun Dec 4 09:20:40 WST 2005


Hi! 

thanks for your reply!

On Sat, 2005-12-03 at 18:55 +0100, Jakub Piotr Cłapa wrote:

> > 2. I can't hide any of the widgets. E.g. a call to
> > self.__cal_label.hide() does not hide the label

Okay I found the problem to this, I used mainwindow.show_all()
in the test case. This had the effect that I could no longer hide the
time controls. 
But unfortunately this behaviour is different from what is done in the c
code! I am really lost with this one! 
Why are the widgets in the c code not shwown by the call to show_all??

> > 3. The c version of the widget had two different constructors, as far as
> > I understood is this impossible in python, so how do you cope with it.
> 
> You add keyword arguments to __init__ and check them on runtime or (my 
> own idea; not sure if it's Harmful(TM)) add a class method returning an 
> instance.

I dont' like the idea, since the two keywords would mean the same thing
and it would be unclear which one to fill out, or even both...
So overloading would be the best, if possible.
How do others handle this?

Finally I have attached the new state of the widget, it already is
useable, even so I have not yet added the set_property, get_property
stuff. Some help / demo code with this part would also be very cool.

Anyways this version can already be tested for functionality and bugs!

Thanks a lot, Fabian


-------------- next part --------------
A non-text attachment was scrubbed...
Name: dateedit.py
Type: text/x-python
Size: 13045 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20051204/39437425/dateedit-0001.py


More information about the pygtk mailing list