[Glade-users] Custom entry box

There isn't anything like this at present.
I've been sent a patch which does something quite similar - it adds "Numeric"
and "Upper Case" options to GtkEntry in Glade. Thes ignore non-numeric
characters and convert to upper case respectively.

hmm. I'll try the patch. Is it available already?

I'm not sure if we should add something like this to Glade, or if we should
wait for it to be added to GTK+.

A few issues:

 o What should happen when an invalid character is entered? Is it silently
   ignored or should a dialog pop up saying "The format should be 'xxxx'"

I think it can just beep to warn the user that he pressed wrong key. The
format should be specified in tooltip.

 o If you sete the mask to 9999-09-09 how would it be displayed initially?
   Would it show "    -  -  ", and then let you type over it. (This would

Yes, the entry should be prefilled with the blank format and the spaces
(or underscores or whatever character) should be overwritten. Format
character are ignored, so when user types in the year, the cursor jumps
to the month, there must be taken care of delete and backspace keys,
cursor keys, ...
I know it is not easy, but it's possible.

   need changes to the way GtkEntry works.) Or is the user expected to type
   in the '-' characters. This would be too difficult for the user.

I checked the GTK+ mailing list, there are some subclasses of GtkEntry
which looks good, but it's not part of GTK+ and therefore cannot be
supported by Glade. I hope some good preformatable GtkEntry will be part
of GTK+ 1.3, according to the documentation and sources of GTK+ 1.3 it
doesn't seem so.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]