Yes, maybe regex is too much complex and differentiate alpha and numeric chars will be 
sufficient.
I have thought about regex to fit all needs people could have in the future, from 
alpha/num to a field with ip formating...

Maybe just two properties (PG_WP_ALPHA & PG_WP_NUM) could be sufficient to solve this 
'blem in the simplest way...?
And a inc/dec button could be attached to a field widget in the same way a scollbar is 
with the condition that PG_WP_NUM is set...?

Eh eeeh, seems the Field widget don't want to die... ;-)
-philippe

> It might be kind of excessive to implement regular expression parsing 
> in the server for this... but I was thinking maybe specifying a range 
> of acceptable characters, or maybe an array with characters or ranges 
> of characters to accept.
> 
> Also, Yann suggested a spinner widget. It would be like a field, but 
> only accept numeric entry (of any radix.. hex, octal, decimal, etc) 
> plus it would have buttons for incrementing and decrementing the value.
> 
> On 2002.02.11 09:52 Philippe Ney wrote:
> > Hi Okan,
> > 
> > At this time there isn't any widget property that could restrict the
> > character type the user is allowed to enter.
> > 
> > But this could be useful to have such a property that will support
> > every possible restrictions using regular expression. For exemple
> > 
> > pgSetWidget(PGDEFAULT, PG_WP_REGEX,
> > "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$", 0);
> > 
> > will be interesting.
> > 
> > This feature will certainly interest other people too. Discussion is
> > open.
> > -philippe
> > 
> > 
> > >   I think there is no any property now,like : If I want to
> > > take only numbers from a field widget,or both of them
> > > (numbers and characters...),is this possible (a widget
> > > property ) ??? If no,I think it is not hard to implement,so
> > > help us our seniors (Philippe and Micah ) :)....   
> > >   Thanks anyway....

_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel

Reply via email to