Subject | TEditEnh component selstart and sellength |
---|---|
Author | Zoltan Hubai |
Post date | 2001-05-16T15:25:07Z |
Hi!
I made a small program with the TEditEnh component becouse of the mask
property but I have find out some strange thing.
I use the OnChange event to trap the changes in the component but when I
want to access the SelStart and SelLength propertys I always get 0 as a
result when I apply the mask to the control. The mask is "::SM::99;0; ;".
When I use the control without the mask I get the values from the SelStart
and SelLength propertys. Another thing is that in OnKeyPress or OnKeyDown
events I allways get the SelLength and SelStart propertys.
I tried in OnChange event the EM_GETSEL and EM_EXGETSEL messages but with no
result.
Please can you help me?
With best regards Zoltan.
I made a small program with the TEditEnh component becouse of the mask
property but I have find out some strange thing.
I use the OnChange event to trap the changes in the component but when I
want to access the SelStart and SelLength propertys I always get 0 as a
result when I apply the mask to the control. The mask is "::SM::99;0; ;".
When I use the control without the mask I get the values from the SelStart
and SelLength propertys. Another thing is that in OnKeyPress or OnKeyDown
events I allways get the SelLength and SelStart propertys.
I tried in OnChange event the EM_GETSEL and EM_EXGETSEL messages but with no
result.
Please can you help me?
With best regards Zoltan.