Re: [Gambas-user] MaskBox.Mask

2014-05-06 Thread Patrik Karlsson
Thank you for your input. I will keep my code since I prefer the protection for CTRL-V over the optimization for a very short string. However, the _KeyPress and Stop Event will come in handy in another place, thanks! /Patrik 2014-04-27 16:26 GMT+02:00 Tobias Boege : > On Sat, 26 Apr 2014, Patri

Re: [Gambas-user] MaskBox.Mask

2014-04-27 Thread Tobias Boege
On Sat, 26 Apr 2014, Patrik Karlsson wrote: > Hi, > > today I am using TextBox_Change event to reject | characters. > > Public Sub txtName_Change() > > If String.InStr(Last.Text, "|") > 0 Then > Last.Text = Replace(Last.Text, "|", "") > Endif > > End > > I guess MaskBox can do this muc

[Gambas-user] MaskBox.Mask

2014-04-25 Thread Patrik Karlsson
Hi, today I am using TextBox_Change event to reject | characters. Public Sub txtName_Change() If String.InStr(Last.Text, "|") > 0 Then Last.Text = Replace(Last.Text, "|", "") Endif End I guess MaskBox can do this much simplier, but how, what Mask? /Patrik -