U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » LineEdit, EditFields, DocEdit » Input mask on an EditInt
Re: Input mask on an EditInt [message #53083 is a reply to message #53081] Mon, 24 February 2020 12:13 Go to previous messageGo to previous message
Giorgio is currently offline  Giorgio
Messages: 218
Registered: August 2015
Experienced Member
Hi,
is there an example of that?

At the moment I have changed the field from EditInt to EditString, create the converter (see below) and "bound" the converter to the EditString, but this crashes the application.

Thanks,
gio

ConvertOrderNumber c;
order_number.SetConvert(c); //<-- order_number is the EditString in the .lay file


struct ConvertOrderNumber : Convert{
  Value Format(const Value &q) const
  {
    String input=AsString(q);
    return input.Left(2)+"."+input.Right(input.GetCount()-1);
  }
};
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Uppercase in EditField and cursor position
Next Topic: How to toggle on/off word wrap in LineEdit/DocEdit?
Goto Forum:
  


Current Time: Sun Jun 21 14:06:26 GMT+2 2026

Total time taken to generate the page: 0.00491 seconds