I have been working on my first Tk app and have run into a snag. I need to be able to copy the contents of a canvas widget to the clipboard. A super search on perlmonks for
canvas clipboard returned nothing. Searching on google returned a lot of stuff but nothing that helped me (at least not with this problem). From what little I have learned, I need to do:
$canvas->clipboardClear;
$canvas->clipboardAppend(-format=>'BITMAP',-type=>'BITMAP',?--?,data);
My problem is that I have no idea what needs to go in place of the "data" so that it will use the contents of the canvas.
In place of "data", I tried using
$canvas and
\$canvas which returned no errors but of course didn't work either. I also tried assigning the return of
$canvas->find('all') to a variable and using that in place of "data". Again, a miserable failure.
I'm sure that I have simply over looked something terribly obvious but I just can't seem to find the answer. Any help, examples, or links would be greatly appreciated.
Thanks,
Chris
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.