HEllo i would like to change the text of a Field if it gets the focus
- procedure TCrTableForm.WPRichText1EditFieldFocus(Sender: TObject; const InspName: string; Enter: Boolean; FieldObject: TWPTextObj; var Abort: Boolean);
- value : string;
- if inspName = 'PROZENT' then begin
- if Enter then begin
- value := '12';
- else begin
- value := '12,0 %';
- FieldObject.EmbeddedText := value;
But i think it is not correct to do it this way, because if i do it, i didn't get evere FocsuEnter and FocusLose Event ...
if i remove the WPRichText1.Refresh, i get ALL Events, with this code i sometime didn't get the next FocusChange event.
And what is the best practise, to select the whole text if i focus a field?