Autor Beitrag
Scofield2011
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Windows XP, Windows 7, Windows 8
C#, VBA, VB
BeitragVerfasst: Di 14.02.12 22:31 
Hallo,

ich habe eine Frage bezüglich ContextMenus.

Und zwar habe ich in meiner Form zwei ContextMenuStrips. Eines davon habe ich in den Properties eines Controls als ContexMenu definiert. So weit kein Problem.

Zusätzlich habe ich noch zwei TabCards, wobei sich das Control mit dem ContextMenu nicht auf einer der TabCards befindet, sondern rechts daneben.

Beim Wechsel der TabCards soll dabei auch das ContextMenu des Controls wechseln.

Geht so was? Ich habe schon probiert und im Internet gesucht, aber leider nichts passendes gefunden.

Vielen Dank schon einmal im Voraus für eure Hilfe

Scofield2011
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4708
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Di 14.02.12 22:48 
Du könntest zur Laufzeit einfach der ContextMenuStrip Property deines Controls ein anderes ContextMenu zuweisen wenn dein TabCard (was immer das auch ist) wechselt.
Scofield2011 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Windows XP, Windows 7, Windows 8
C#, VBA, VB
BeitragVerfasst: Mi 15.02.12 00:04 
user profile iconRalf Jansen hat folgendes geschrieben Zum zitierten Posting springen:
Du könntest zur Laufzeit einfach der ContextMenuStrip Property deines Controls ein anderes ContextMenu zuweisen wenn dein TabCard (was immer das auch ist) wechselt.


Das hatte ich auch geplant, aber leider habe ich noch nicht heraus gefunden wie man das macht.
Scofield2011 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 55

Windows XP, Windows 7, Windows 8
C#, VBA, VB
BeitragVerfasst: Mi 15.02.12 00:32 
Ich habe gerade die Lösung gefunden. Die Frage hat sich also erübricht.