or you can write a code in TextBox_Change() method. So if user copy paste a serial number like text to accept it. I think this solution contains also the keypress case.
For start you can replace digits with spaces. Like TextBox.text = " - - " Then in every change to replace each space with a digit maybe with a Replace$ function. But when you reach the - character preserve it in string. You want something like that? On Thu, 2010-10-14 at 20:51 +0200, tobias wrote: > [email protected] 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 > > [email protected] > > 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 > [email protected] > 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 [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
