Im trying to copy the Caption of a TLabel to the clipboard, how would I achieve this? Any bits of code, hints or suggestions are welcome.
The reason I want to use an TLabel is because I dont want the users to be able to change its contents but I do want them to be able to copy it of there, I know I could use a read-only TEdit but I think that looks so dumb if people can select text they cant change.
This is what I have tried so far, on contextclick copy the caption of the label to an invisible TEdit and copy from there to the clipboard by MyEdit.CopyToClipboard; this doesn't seem to work when not visible.
Ive tried this (MyLabel as TEdit).CopyToClipboard;
(I know, but I'll try anything lol)
Thanx allot in advance,
BobbaFet ![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
The reason I want to use an TLabel is because I dont want the users to be able to change its contents but I do want them to be able to copy it of there, I know I could use a read-only TEdit but I think that looks so dumb if people can select text they cant change.
This is what I have tried so far, on contextclick copy the caption of the label to an invisible TEdit and copy from there to the clipboard by MyEdit.CopyToClipboard; this doesn't seem to work when not visible.
Ive tried this (MyLabel as TEdit).CopyToClipboard;
(I know, but I'll try anything lol)
Thanx allot in advance,
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
![[bobafett] [bobafett] [bobafett]](/data/assets/smilies/bobafett.gif)
Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com