Создаю выпадающее меню для TActionClientItem со списком TAction. Я хотел бы знать, как я могу захватить событие рисования для меню или каждого TAction внутри, чтобы отобразить заголовок этих TAction по-другому? Что-то вроде TAction.OnDrawItem или TActionClientItem .OnDrawItem ...Custom Draw TAction Выпадающее меню
procedure xxxxx.BuildActionMenu;
var
iLoop : Integer;
oItem : TAction;
oClientItem : TActionClientItem;
begin
if Assigned(oClientItem) then
for iLoop := oClientItem.Items.Count - 1 downto 0 do
oClientItem.Items.Delete(iLoop);
for iLoop := 0 to List.Count - 1 do
begin
oItem := TAction.Create(actionList);
oItem.Caption := List[iLoop].Name;
oItem.Tag := iLoop;
oItem.OnExecute := HandleOnExecuteMenuItem;
**oItem.OnDraw = WhateverFunction**
oClientItem .Items.Add.Action := oItem;
end;
if Assigned(oClientItem) then
begin
if oClientItem.CommandProperties is TButtonProperties then
TButtonProperties(oClientItem.CommandProperties).ButtonType := btSplit;
TAction(oClientItem.Action).OnExecute := HandleOnExecuteParentItem;
**oClientItem.OnDraw = WhateverFunction**
end;
end;
Приветствия.