Re: [pygtk] list like behaviour for GtkListStore
On Sun, Jul 14, 2002 at 10:51:42AM +0800, James Henstridge wrote: Christian Reis wrote: Will append() take arguments? I found this a bit odd in the API. I have been considering it. It is probably a good idea, as it gives better compatibility with python lists. As it is, append() adds an empty line, I assume? It represents a tree path. store[0] - store[n] are the top level nodes in the tree. store[0,0] - store[0,n] are the children of the first node. store[0,1,0] - store[0,1,n] are the children of the second child of the first toplevel node. So store[0,3] represents the forth child of the first toplevel node. Trees demand complicated explanations. :-) Looks good. Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
[pygtk] GtkEntry mask/validation
I've hacked into Kiwi entry masks and validation, as contributed by Ricardo Lenzi (another brazilian, whee). The basic API works more or less like this: e = Kiwi.Entry() e.enable_mask(DD/DD/) The entry becomes automatically: __/__/ You can insert text at any point and it will fill out correctly. If you would rather use another character to indicate spaces, any one works: e.enable_mask(DD/DD/, empty_char=.) ../../ e.set_text(16021976) fills out the date accordingly, so the masked entry becomes: 16/02/1976 e.get_text() returns 16021976 e.get_text(raw=1) returns 16/02/1976 e.insert_text() inserts at the current position, but I'm not sure about the cursor position yet. Anybody know what would be expected? Does anybody have any comments on the API, or on the functionality? I'd like to hear it before I commit and it's left to Bugzilla :-) Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL ___ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/