![]() |
vom PopUpMenu Item auf das Sender Control kommen
Hallo Zusammen,
ich habe auf einer Form 8 TcxGrid Controls (das wird so benötigt) Alle 8 Grids bekommen das gleiche PopUpMenu zugewiesen. Das PopUpMenu hat ein Item zum speichern der Spalteneinstellungen. Das ist eine Action. Wenn ich auf den MenuItem Klicke bekomme ich als Sender das Action Object. ShowMessage( (Sender as TAction).ActionComponent.Name ); liefert mir ein dxBarButton48 Item. ShowMessage( (Sender as TAction).ActionComponent.GetParentComponent.Name ); dxBarManager1 Ich möchte jedoch auf das Grid zurück. Hat jemand eine Idee? Gruß Kostas |
AW: vom PopUpMenu Item auf das Sender Control kommen
Sorry, ich habe auf DevExpress SupportCenter eine Lösung gefunden.
So geht´s.
Delphi-Quellcode:
var
AGridSite: TcxGridSite; AGrid: TcxGrid; AView: TcxCustomGridView; begin if (ActiveControl is TcxGridSite) then begin AGridSite := ActiveControl as TcxGridSite; AGrid := AGridSite.Parent as TcxGrid; AView := AGridSite.GridView; AView.PatternGridView.StoreToIniFile( dm1.LayoutIni, false, [] ); end; |
AW: vom PopUpMenu Item auf das Sender Control kommen
Das PopupMenü hat ein .PopupComponent, wo der wirkliche "Sender" drin steht.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 21:23 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