Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable all actions in delphi form

Tags:

windows

delphi

I have a form with some actions. I need to disable all actions when I call my LogOff procedure. How I have to do?

like image 541
programer Avatar asked Dec 11 '22 15:12

programer


2 Answers

If by "actions" you mean that you use ActionList then set it's State to asSuspended. Per documentation then:

The actions in the action list do not respond when client objects tell them to "fire". The Enabled property for all actions in the list is unchanged

like image 149
ain Avatar answered Dec 13 '22 05:12

ain


If you Using " ActionList " you can try :

ActionList1.State:=asSuspended;

this will suspend all actions in the ActionList.

if you want to enable it again use :

ActionList1.State:=asNormal;

if you using " ActionManager " you can use the same way :

ActionManager1.State:=asSuspended;

if want to enable it again :

ActionManager1.State:=asNormal;

Good Luck.

like image 36
Ilyes Avatar answered Dec 13 '22 03:12

Ilyes