Процедура DisableCommand |
Процедура запрещает команду.
procedure DisableCommand (aCommand : word);
aCommand : word - имя команды.
interface test12 'Тест 12' (,,scTest); var commands : array[1..2] of word; create view as select * from Table1,Table2 where ((Table1.number_Dep==Table2.number_Dep)); browse depBrowse12; fields Table1.number_Dep 'Номер отдела' : protect; Table1.name_Dep 'Наименование отдела': protect; Table2.name_Sotr 'Имя сотрудника'; Table2.number_Sotr 'Номер сотрудника'; end; handleEvent cmInit: { DisableCommand(cmValue1); commands[1]:= cmValue2; commands[2]:= cmValue3; DisableCommands(commands); } cmInterface : RunInterface(test13); cmDialog : RunDialog(test14,1,1,1,'gh'); cmMenu : { DisableCommand(cmSaveDataBase); RunMenu('Vspom'); } cmTest : { if CommandEnabled(cmValue1) = false { EnableCommand(cmValue1); EnableCommands(commands); } else { DisableCommand(cmValue1); DisableCommands(commands); } } end; end.
SetEnableCommand, EnableCommand, EnableCommands, DisableCommands, CommandEnabled.