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 Design-Problem bei mehreren Forms + Actions (https://www.delphipraxis.net/172652-design-problem-bei-mehreren-forms-actions.html)

Codewalker 15. Jan 2013 17:24

Design-Problem bei mehreren Forms + Actions
 
Ich habe einen kleinen MDI-artigen Texteditor für meine Zwecke geschrieben. Das klappt soweit ganz gut, aber die Shortcuts machen mir Probleme.
Ich habe eine Action "Kopieren" mit Shortcut Strg+C im Bearbeiten-Menü eingetragen ist und in meinem Editor die entsprechende Aktion durchführt. Das Problem ist, dass ich jetzt in keinem TEdit etc. mehr Text kopieren/einfügen kann, weil das auch immer im Texteditor gemacht wird.
Wie würdet ihr sowas sauber lösen?

Bummi 15. Jan 2013 17:44

AW: Design-Problem bei mehreren Forms + Actions
 
Ich würde den ShortCut weglassen :wink:

Volker Z. 15. Jan 2013 17:47

AW: Design-Problem bei mehreren Forms + Actions
 
Hallo,

Du könntest Deine Paste-Action Execute / Update ergänzen:
Delphi-Quellcode:
procedure TMDIForm.PasteExecute (Sender : TObject);
begin
  FActiveEdit.PasteFromClipboard
end;

procedure TMDIForm.PasteUpdate (Sender : TObject);
begin
  FActiveEdit := nil oder ActiveMDICild.ActiveControl wenn TCustomEdit
  // Action Paste disabled wenn FActiveEdit nil
end;
Gruß

generic 16. Jan 2013 09:53

AW: Design-Problem bei mehreren Forms + Actions
 
Hast du die Default/Mitgelieferten-Actions für Copy/Paste etc. verwendet oder das selbst implementiert?

Codewalker 16. Jan 2013 11:12

AW: Design-Problem bei mehreren Forms + Actions
 
Die sind selbst implementiert, wobei ich nur
Delphi-Quellcode:
Editor.CutToClipboard
etc. aufrufe


Alle Zeitangaben in WEZ +1. Es ist jetzt 19:04 Uhr.

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