StartEditor on Popup Form
StartEditor on Popup Form
I have a detail screen that pops up when I am editing the main form. I am trying to get it to start the editor on the first cell in the grid of the new popup form. If I try to start the editor I get an error "Cannot focus on a disabled or invisible window". I checked and the grid is enabled but not focused so I tried the SetFocus command but get the same error when I am trying to SetFocus. How can I get the screen to come up with the Editor started. AutoEdit doesn't seem to do the trick either.
Re: StartEditor on Popup Form
Hello,
I'm getting this same error when I try to set the first cell in edit mode at FormCreate. But it works fine if I do the same at FormShow.
I'm getting this same error when I try to set the first cell in edit mode at FormCreate. But it works fine if I do the same at FormShow.
Code: Select all
type TVCLTeeGridAccess=class(TVCLTeeGrid);
procedure TStringGridForm.FormShow(Sender: TObject);
begin
TVCLTeeGridAccess(TeeGrid1.Grid).StartEditor(TeeGrid1.Columns[0], 0);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |