Recent

Author Topic: Disable/enable controls  (Read 274 times)

Medhome

  • Newbie
  • Posts: 4
Disable/enable controls
« 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

Handoko

  • Hero Member
  • *****
  • Posts: 3765
  • My goal: build my own game engine using Lazarus
Re: Disable/enable controls
« Reply #1 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

 

TinyPortal © 2005-2018