TAdvStringGrid mask...

Hello,



Version 7.7.4.1



When GridGetEditMask is called I set the mask to:

Value:='!099.099.099.099;1;'



The field is for an IP address. When the cell is clicked to begin editing and the field is blank, I want the caret to be at the start of the field so the user can enter the address. As it is, the caret always starts at the end of the field.



I have tried many things to move the caret to the start of the field and all have failed.



Ideas?



Thanks,

You can do this by implementing the OnGetEditorProp event like:


procedure TForm1.AdvStringGrid1GetEditorProp(Sender: TObject; ACol,
  ARow: Integer; AEditLink: TEditLink);
begin
  advstringgrid1.NormalEdit.SelStart := 0;
  advstringgrid1.NormalEdit.SelLength := 0;
end;


Thanks, it worked.