Don't ask to ask, just ask | |
PerlMonks |
Re: TK question: navigating framesby rcseege (Pilgrim) |
on Sep 22, 2006 at 01:24 UTC ( [id://574284]=note: print w/replies, xml ) | Need Help?? |
Update: Nevermind about DirTree -- it probably isn't what you want, despite appearances to the contrary -- at least, it's not as flexible as I remembered. Of the three I mentioned, probably HList is the best bet. However, it's pretty discouraging after all this time to still find the bindings to be faulty despite several submitted patches... still, if you use "single" selectmode, then browsecmd should work Ok. Three different developers, three different choices for the widget used for mavigation in the left pane. In addition to looking at Tk::Listbox and Tk::Text, I would also suggest you consider one of the HList widgets (Tk::HList, Tk::Tree, or Tk::DirTree) - Tk::DirTree, in particular. HList, Tree, and DirTree all feature the -browsecmd option which can be used to define a callback when a user browses through entries. DirTree allows you to specify the directory using the -directory option which will populate the DirTree widget for you. DirTree should simplify the population of the widget entries, and the binding as well, compared to the other approaches, though all of the mentioned approaches should work fine. You might even consider trying all three as an introduction to learning Tk. Side note to liverpole: that was a nice intro to Text tags (++). Rob
In Section
Seekers of Perl Wisdom
|
|