|
From: Steve L. <st...@Di...> - 2006-01-25 05:12:04
|
Hi Joe, Thanks for your prompt response ... Even though we discussed it on the chat, I'll follow up to the list for the sake of posterity On 25/01/2006, at 12:32 PM, Joe English wrote: > Steve Landers wrote: > >> The main issue I've struck so far has been limitations with the >> notebook widget. Whilst I suspect that notebook can do everything I >> want, I find it much less convenient to use than the BWidget >> notebook. I >> For example, BWidget NoteBook has a raisecmd option, that causes the >> specified command to be run when a tab is raised. > You can replace '-raisecmd' and '-leavecmd' with ... ... > a useful approach is to generate your own <<TabRaised>> virtual > events: ... > If you need to generate <<TabLowered>> events too (-leavecmd), > you'll need to keep track of the previous tab by hand. > (But again, <Unmap> bindings might be what you want instead). ... You've just confirmed what I am saying ... Tile can do the job but I need to do a bunch more work myself to make it happen. As discussed, it could be due to an impedance mismatch between the virtual event approach and the callback approach used by other toolkits. If so, I see this as an artificial barrier to the adoption of Tile. Agreed, in a virgin environment it mightn't matter but it's a barrier given people's existing skills and investment in code. Also, as discussed, I can see the two conflicting goals of Tile coming into play - theme support and a simpler API. I came to Tile to get theme support but to get that I have to change my development style. That's OK if 1) my style is horribly wrong and 2) the Tile approach implements an accepted best practice. But in the absence of any evidence to the contrary, I conclude that there is no one best practice and Tile merely implements your preferred style :) Let's keep the discussion going - IMNSHO the subject is too important in the life of Tcl/Tk to not revisit it even though it is going over old ground. >> except I don't see any way of retrieving it. > > This is a Frequently Asked Question, with a not very satisfactory > answer :-(. The canonical way to get the name of the currently- > selected > tab is [lindex [$nb tabs] [$nb index current]]. > > There really ought to be a more straightforward way to access this. > [$nb current] maybe? Sounds reasonable to me Cheers Steve |