Luciano França Posted August 18 Share Posted August 18 How could I put "UniForm.Enabled = false" in a form and thereby disable all the controls that are inside it ? Quote Link to comment Share on other sites More sharing options...
Tokay Posted September 18 Share Posted September 18 Up. How to temporary disble whole form? Does it possible? Quote Link to comment Share on other sites More sharing options...
yakup Posted September 18 Share Posted September 18 Find your form in the TUniMainModule.UniGUİ MainModuleNewComponent procedure. And for in components , set the components to Enabled False with foreach. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 18 Share Posted September 18 6 hours ago, Tokay said: How to temporary disble whole form? Does it possible? // something like this procedure TMainForm.UniBitBtn1Click(Sender: TObject); procedure DisableControls(Ctl: TControl; AEnabled: Boolean); var I: Integer; WC: TWinControl; begin if Ctl is TWinControl then begin WC := TWinControl(Ctl); for I := 0 to WC.ControlCount-1 do DisableControls(WC.Controls[i], AEnabled); end; Ctl.Enabled := AEnabled; end; begin Self.Enabled := not Self.Enabled; DisableControls(Self, Self.Enabled); // end; 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.