![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Статья Тенцера про СОМ.
vitv © (2007-05-25 15:26:00)type
TForm1 = class(TForm)
ActionList1: TActionList;
acLoad: TAction;
acSave: TAction;
acClear: TAction;
ToolBar1: TToolBar;
ToolButton1: TToolButton;
ToolButton2: TToolButton;
ToolButton3: TToolButton;
ImageList1: TImageList;
procedure ActionList1Update(Action: TBasicAction;
var Handled: Boolean);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
procedure TForm1.ActionList1Update(Action: TBasicAction;
var Handled: Boolean);
var
Supported:TCommandTypes;
TC:IToolBarCommands;
begin
if Assigned(ActiveMDIChild)
and ActiveMDIChild.GetInterface(IToolBarCommands,TC) then
Supported:=TC.SupportedCommands
else
Supported:=[];
Не могли бы вы объяснить следующий код?
acSave.Enabled:=ctSave in Supported;
acLoad.Enabled:=ctLoad in Supported;
acClear.Enabled:=ctSave in Supported;
Anatoly Podgoretsky (2007-05-25 15:27:00) [1]> vitv (25.05.2007 15:26:00) [0]
Проверка на вхождение во множество