pira...@mail.com schrieb:
EXACTLY
EXACTO
That's what I need.
The function is called input mask. I could not find it in Gambas.



-----Original Message-----
From: tobias <tobiasb...@web.de>
To: mailing list for gambas users <gambas-user@lists.sourceforge.net>
Sent: Fri, Oct 15, 2010 9:26 am
Subject: Re: [Gambas-user] Question about some simple code enterin' data


pira...@mail.com schrieb:
Thanks Tobi for your quick reply.
With TextBox_KeyPress() I manage the insertion of numbers. But I need
to display both scores before the data entry.
The example you gave me with the serial numbers is exactly what I
need.
Let's say -as another posibility- that I'd like to enter a date in a
format "mm/dd/yyyy"... I need to show both slashes before entering
data
and, while typing numbers, I need to move between characters
automatically.
I'd like some code as an example just to figure out howto manage it.
Hope to be clear  with my explanation.
Thanks again.
Wait 4Ur answer.
Pablo.



-----Original Message-----
From: tobias <tobiasb...@web.de>
To: mailing list for gambas users <gambas-user@lists.sourceforge.net>
Sent: Thu, Oct 14, 2010 3:51 pm
Subject: Re: [Gambas-user] Question about some simple code enterin'
data

pira...@mail.com schrieb:
Hi everyone.
I need to enter numeric data into a previously formatted text field.
The format is 99-9999999999-9, where 9s are any number.
I need to display just  the scores so the operator just enters the
numbers.
Please help!!
Thanks in advance.
Pablo.


-------------------------------------------------------------------------

-----
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating
great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
hi,
i think you want make one single textbox to display some sections of
numbers e.g. like a serial numbern, with some - between the sections??
or what do you mean?
if this is the case, you may implement a TextBox_KeyPress() event to
handle each keypress and if one section is complete, insert your
separator (e.g. "-"), this way you also may prevent the insertion of
chars which shouldn't be part of the pattern.

regards,
tobi


-------------------------------------------------------------------------

-----
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating
great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user




-------------------------------------------------------------------------
-----
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating
great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
hi,
ok, my english is not as good as it should be^^ (i don't know what you
mean with "I need to move between characters
automatically." and "But I need
to display both scores before the data entry.")

but if i understood, you  want to have the slashes in the clear textbox
and if one section is complete automatically jump behind the slash?

-------------------------------------------------------------------------
-----
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
well, during writing an example for you, i found that it is not as difficult as i thought it would be... you just have a mask, e.g. "__/__/____" and every keypress you search for the next "_" char and replace it with the key.code, the only thing you have to notice is that you have to take care of moving the textbox1.pos value for a better looking, which is done in my example too ;)
but there are still some improvements neccessary:
*copy, paste of a value
*the end of the mask is reached
*the backspace key!
in case of a date: *check the input, e.g. days can't be > 31

regards, tobi

Attachment: input_mask-0.0.1.tar.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to