Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
55
UltraMaskedEdit control not selecting all the values while doing tab
posted

Hi ,

i am using the UltraMaskedEdit controls and having input mask as 9999.99 whenever i enter value like 130.99 and click on tab it moves to next control and whenever i click on shift + tab it selects only 139 instead of 139.99. Does i need to change certain property to do that. Please help me in here.

Parents
No Data
Reply
  • 23930
    Offline posted

    Hi Pratap,

    Thank you for posting in our forums.

    The default behavior in WindowsForms is when you press the Tab key you switch to the next control according to the tab order. If you press Shift+Tab you go to the previous control.  If you want to change this, you will need to overwrite the ProcessCmdKey method of the form and then check if the user has pressed Shift+Tab. If they have use the PerformAction method to first select the first character and then select its section. Also the UltraMaskedEdit has some predefined action for the Tab key in its KeyActionMappings collection. You will need to remove them in order to ensure that when the user presses Tab it will always go to the next control.

    I have attached a sample which demonstrates this approach.

    Please let me know if you have any additional questions.

    WE_MaskTabBehavior.zip
Children