MaskedTextBox Help

  • Thread starter Thread starter Mike Fellows
  • Start date Start date
M

Mike Fellows

I have a few masked textboxes within my application and I have the same
problem with each and everyone

If I tab to a masked textbox i have no issues, but when i click into a mask
textbox the problems arise.

when i click in it places the cursor where i click (not at the start of the
masked textbox), this forces users
to either click back to the start of the textbox or hold the left arrow key
to move back to the start

is there anyway to stop this, or even an onclick event?

Thanks

Mike Fellows
 
to be honest there isnt any code

i have a maskedtextbox (a standard control in vs 2005)

if i set the mask to 0000000000 (right click properties)

this will only allow me to input numbers (to a max of 10 numbers into the
control)

but when i click onto the control it will start at the posistion i click
(not at the start/left)

Cheers

Mike
 
....yes - the only way around it is I've written an onEntry trigger for each
textbox and in it put:

yourmaskedtextbox.selectall()

It has the effect of selecting all of the text in your textbox so the cursor
gets put at the beginning of the field. May not be what you want - but it
works in certain cases depending on your needs.
 
Back
Top