Perl Monk, Perl Meditation | |
PerlMonks |
tk canvas textby jsteng (Beadle) |
on Apr 16, 2018 at 10:12 UTC ( [id://1212975]=perlquestion: print w/replies, xml ) | Need Help?? |
jsteng has asked for the wisdom of the Perl Monks concerning the following question:
Hi I am trying to make a customized TK::Listbox using TK::canvas because I need the ability to change text color and font when <double-1> here is my initial work: Problems: 1. I could not make the scrollbar scroll. 2. How do I change the selected item's font/color? I tried doing this: But it is not working. 3. lastly, how do I retrieve a particular selected text's font/color? Sorry folks, I am very rusty with perl after years of not programming. Thanks BTW: My original (>10 years ago) script used TK::ROText; however in that version, the windows' size is fixed, and all entry in the ROText are space padded to cover the whole line (sprintf "%-50s", $text). Then using tag for each line. That was a nightmare, it was ugly programming. I am redoing that script to use Listbox; it was alot cleaner but I could not change font of selected text (line) thus I am redoing it with Canvas.
Back to
Seekers of Perl Wisdom
|
|