Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: TK question: navigating frames

by rcseege (Pilgrim)
on Sep 22, 2006 at 01:24 UTC ( [id://574284]=note: print w/replies, xml ) Need Help??


in reply to TK question: navigating frames

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://574284]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found