ComboBox with regex mask

Posted by: fsegui on 18 April 2021, 7:49 pm EST

  • Posted 18 April 2021, 7:49 pm EST - Updated 3 October 2022, 2:14 pm EST

    Hello,

    I’m trying to use regexp edit mask on ComboBox.

    I want to restrict use input to decimal only.

    Here’s what I have :

    
    cmb.MaskInfo.RegexpEditMask = "\D*[,]?\D*"
    cmb.MaskInfo.ShowLiterals = C1.Win.C1Input.ShowLiteralsEnum.WhenNextStarted
    

    That restricts well input but when putting a comma, it’s displayed at the end…

    NB : I cannot use datatype of ComboBox because translateValue is set to true (Combo is binded).

    How can I proceed?

  • Posted 19 April 2021, 4:50 pm EST

    Hi,

    We have escalated this issue to the development team and will let you know when we have an update.

    Regards.

    Avnish

    [Internal Tracking ID: C1WIN-24751]

  • Posted 19 April 2021, 4:51 pm EST

    Hi Avnish,

    Thanks for your feedback, I’m waiting for development’s team update.

    BR,

  • Posted 4 May 2021, 1:36 am EST

    Hi Avnish,

    Any news on this?

    Thanks,

    BR

  • Posted 4 May 2021, 7:20 pm EST

    Hi,

    As per the developers, it is by design C1Input controls shown prompt chars for all part of the regexp mask.

    For example: @“[0-9][,]?[0-9]” - it’s 64 + 1 + 64 ‘’ chars, and when you enter ‘,’ then cursor moved to 65 position of them.

    For @“[0-9]{5}[,]?[0-9]{5}” - it’s 5+1+5 '
    ’ chars.

    MaskInfo has ShowLiterals mode FreeFormatEntry without this limitation, when control don’t show ‘_’ chars.

    Sorry for the inconvenience.

    Regards.

    Avnish

  • Posted 4 May 2021, 7:47 pm EST

    Hi,

    That’s not suitable for me as I do not want to show any letters.

    So I’ll handle this with the keypress event.

    Thanks

    BR

  • Posted 5 May 2021, 7:33 pm EST

    Hi,

    Sorry for the inconvenience. Please let us know if you need any other assistance.

    Regards.

    Avnish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels