Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Eigene Standard Action Class (TActionList) (https://www.delphipraxis.net/130242-eigene-standard-action-class-tactionlist.html)

trashcandesign 5. Mär 2009 12:26


Eigene Standard Action Class (TActionList)
 
Moin,

ich habe eine TActionList, der ich eine eigene StandardAction hinzufügen möchte.
Also sowas wie TEditCut, TEditCopy usw.

Wenn ich mir jetzt ne eigene Klasse bastel

Delphi-Quellcode:
TMyClass = class(TAction)
public
function Execute: Boolean; override;
end
wie kann ich die als Standard Action Class registrieren?

dataspider 5. Mär 2009 12:31

Re: Eigene Standard Action Class (TActionList)
 
Hi,

mit RegisterActions...
Auszug aus meinem Code:
Delphi-Quellcode:
procedure Register;
begin
  // RichEdit
  RegisterActions( 'RW RichEdit',
                 [ TrwRTFIndent,
                   TrwRTFUnIndent,
                   TrwRTFBullets,
                   TrwRTFBold,
                   TrwRTFItalic,
                   TrwRTFUnderLine,
                   TrwRTFStrikeOut,
                   TrwRTFFontName,
                   TrwRTFFontSize,
                   TrwRTFFontColor,
                   TrwRTFAlignBlock,
                   TrwRTFAlignCenter,
                   TrwRTFAlignLeft,
                   TrwRTFAlignRight
                   ], nil);
end;
[EDIT]Man muss natürlich ein Package dafür machen...[/EDIT]
Frank

trashcandesign 5. Mär 2009 12:45

Re: Eigene Standard Action Class (TActionList)
 
Kewl,

danke dir, hat funktioniert ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:25 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz