LucieLastic
Programmer
hi
I have a Pagecontrol and at runtime I do the following:-
1. Create and add new TTabSheets as required (newTab : TTabSheet).
2. For each TabSheet:-
newRich := TRichEdit.Create(self);
newRich.Parent := newTab;
newRich.align := alClient;
newRich.ScrollBars := ssBoth;
newRich.WordWrap := true;
newRich.PopupMenu := RichPopUp;
The problem :-
The popup has a menu item (Copy selected) but in the onclickCopy of the Popup, I don't know how to get the reference to the Richedit that 'called' it.
I thought this would work, but doesn;t, so obviously the sender isn't a TRichedit.
if Sender is TRichEdit then
(Sender as TRichEdit).CopyToClipboard;
How do I reference the 'triggering' Richedit so I can call its copy method ?
I think I need to reference the parent of the popup but not sure if assigning the popup to the richedit automatically becomes the parent.
big ta for any help
lou
I have a Pagecontrol and at runtime I do the following:-
1. Create and add new TTabSheets as required (newTab : TTabSheet).
2. For each TabSheet:-
newRich := TRichEdit.Create(self);
newRich.Parent := newTab;
newRich.align := alClient;
newRich.ScrollBars := ssBoth;
newRich.WordWrap := true;
newRich.PopupMenu := RichPopUp;
The problem :-
The popup has a menu item (Copy selected) but in the onclickCopy of the Popup, I don't know how to get the reference to the Richedit that 'called' it.
I thought this would work, but doesn;t, so obviously the sender isn't a TRichedit.
if Sender is TRichEdit then
(Sender as TRichEdit).CopyToClipboard;
How do I reference the 'triggering' Richedit so I can call its copy method ?
I think I need to reference the parent of the popup but not sure if assigning the popup to the richedit automatically becomes the parent.
big ta for any help
lou