Home > Back-end >  Delphi7 "Delphi always focus a disabled or invisible window"
Delphi7 "Delphi always focus a disabled or invisible window"

Time:10-24

Dynamically created controls, often appear "Delphi always focus a disabled or invisible window" of the error, to go in is in the forms. A fault in the pas
Procedure TCustomForm. SetFocus;
The begin
Cable if not FActive then
The begin
If not, the Visible and Enabled) then//Visible here:=false so out of the above wrong
Raise EInvalidOperation. Create (SCannotFocus);
SetWindowFocus;
end;
end;

Which greatly help, urgent need, thank you

CodePudding user response:

XXX. Don't call in FormCreate SetFocus statements, and affix the code may be related

CodePudding user response:

Upstairs said pole is in the form if dynamically created controls don't formcreate change set focus to formshow inside

CodePudding user response:

No initiative to set focus on the formshow also can't, I use rz controls

CodePudding user response:

You give control setting focus first check to control the visibility and availability

CodePudding user response:

Tracking and error because the visible:=fale. But before I setfocus set visible:=true, still complains, I will upload the sample program, under which master please help, please add my QQ: 704879684
The sample location: http://download.csdn.net/detail/wx810/5039978

CodePudding user response:

Pass a to my E-mail: 956357208 @qq.com, somehow not under the
  • Related