Lazarus

Programming => General => Topic started by: Medhome on December 04, 2019, 08:16:14 am

Title: Disable/enable controls
Post by: Medhome on December 04, 2019, 08:16:14 am
MyTForm has many dbControls and among them there is a combo to search records.

With that combo I manage 2 events:

    Combo.onDropdown = swctrls ;
    Combo.onCloseUp     = swCtrls;

Procedure swCtrls (....)
with dso.dataset do
if controlsdisabled then enableControls else disableControls;
end;

Is there any trick to disable all controls excecpt combo control?

Help will be appreciate.

Med
Title: Re: Disable/enable controls
Post by: Handoko on December 04, 2019, 09:40:22 am
Not really understand what you want to do. But I think maybe you should try TActionList. It may be a bit difficult at  the beginning but after you define and configure all the actions, managing controls become easier.

https://wiki.freepascal.org/TActionList (https://wiki.freepascal.org/TActionList)
TinyPortal © 2005-2018