Topic: Set the focus on a textbox in an invisible form
Title seems strange but it is actually the message I get...
I would like to set the focus on a textbox in another form I am calling from a button.
For instance:
Form1 has several button new record and each button adds something different in a multi-field form then, I want to set the appropriate textbox in focus in form2.
How to do it?
Currently I have:
procedure Details_Button_AddIMEI_OnClick (Sender: string; var Cancel: boolean);
begin
Data_edition.Combo_IMEI_Sttus.dbSQLExecute('select distinct st2.status, st2.id from status st2 where st2.id=3');
Data_edition.Edit_IMEI.SetFocus;
end;
And I get the following error:
Cannot focus on a disabled or invisible window