Jump to content

PopupMenu not show shortcuts


altagur

Recommended Posts

Dear Farshad Mohajeri

 

During spring we dispute about interface and you told web interface is not gui interface. Today is autumn but i think  web interfase  more and mor in future be same as gui. Popup Menu is very very rules  thank a lot of to you. I am write short procedure in keydown event with loop from all actions:

 

procedure TAnyHtmlFrame.MainGridKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
var
  i: Integer; act: TContainedAction; ss: TShortCut;
begin
  ss := ShortCut(Key, Shift);
  for i:=0 to (MainActionList.ActionCount-1) do
    begin
    act := MainActionList.Actions;
    if TAction(act).ShortCut=ss then
      begin
      act.OnExecute(act);
      Key := 0;
      Shift := [];
      Exit;
      end;
    end;
end;
 

And now actions shortcut works. Need only butifull write shortcut in menu. Now I write html code in caption property

 

.Caption := 'Insert <b>Ins</b> :)

 

I think it will be in UNIGUI code - automatic insert ShortCut from Action to Caption of menu item and key down event

But before it afcase need do POPUPMENU property in UNIGUI controls :)

 

But you deside to do smth. in unigui.

 

 

 

Thanks thanks thanks for you anmazing control set unigui

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...