Board index » delphi » TMaskEdit and VK_LEFT and VK_RIGHT events

TMaskEdit and VK_LEFT and VK_RIGHT events

Quote
In article <39BF938E.F381...@hpd.ci.houston.tx.us>, Phil Tusa wrote:
> I am trapping for VK_LEFT and VK_RIGHT in the Main Form's FormKeyDown
> event and notice the following behavior concerning the TMaskEdit
> component

> 1. When focus is placed on any of the TMaskEdit the I-Beam (carret)
> is placed at the right-most position end and the inside contents
> turns blue in color.

That is the standard behaviour of edit controls as dictated by MS: they
select the text on getting focus. You can control this via the AutoSelect
property.

Quote
> 2.   When I enter the first character inside the TMaskEdit component, I
> noticed the Main Form's FormKeyDown VK_LEFT event is executed.  

The mask edit component does a lot of weird keystate and message
manipulations. It has to prevent you from deleting the mask, has to emulate
overtype mode (which the native Windows edit controls do not support), and
so on. Learn to live with that, trying to change it will most likely break
the controls behaviour somewhere.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

 

Re:TMaskEdit and VK_LEFT and VK_RIGHT events


Thanks Peter, again for your helpful assistance!

Quote
>The mask edit component does a lot of weird keystate and message
>manipulations. It has to prevent you from deleting the mask, has to emulate
>overtype mode (which the native Windows edit controls do not support), and
>so on. Learn to live with that, trying to change it will most likely break
>the controls behaviour somewhere.

--
Phil Tusa

Other Threads