Re: Idea for new ttk Notebook virtual event



Adrian Davis wrote:

Frankly in a case such as yours where the data is continually changing,
my preferred approach would be to automatically update the display via a
timer (e.g. update every 30 seconds).  If there is a reason to not have
such an automatic approach - e.g. you may want to evaluate the info
without it being changed while you're doing so, then I'd take another
approach - you may have gathered by now that your refresh via tab click
is definitely not on my list of solutions :)  The non-auto update idea
would be to have a (common) refresh button, maybe at the bottom of the
window while the tabs are at the top. Then, since (from your comments)
you're not entering any data, the focus should be on that button so that
'enter' key cause a refresh.  If you do have to enter data, then I'm sure
I can come up with another idea - other that the tab-click refresh, that
is ;-b


I don't want to do automatic updates. There is a lot of information in
many notebooks and panes. This would be an unacceptable (and in this
case, and uneccessary) overhead...

...And I like the "click any tab to see the current data" idea. As I
said, it's my preference - I don't expect everybody to like it. To be
honest, I'm quite surpised that people feel so strongly about this. I
get the impression that if I had a button to select each "pane" -
having the data update, even if I press the button for the currently
displayed pane, would be ok - but if I want to use notebook tabs it
isn't? I think the notebook looks much neater - and otherwise I'd have
to put in uneccessary refresh buttons (I don't want to update all of
the notebooks using a common refresh) - the whole display will become
very messy.

Anyway, I'm prepared to give on this - I get the point guys -
"<<NotebookTabSelected>>" isn't going to happen...


As you say, it's your program and you can do what you want with it :)
The comment re the refresh button was meant to mean that there would be a
single button on something like a status bar, but that it would act only on
the current tab's pane. Also, I think you misunderstand my intention. I
like the notebook tab idea, but had doubts about using the tab click as a
refresh mechanism for an active tab's pane as well as the way to change the
active tab and display the new tab's pane. Does that make any more sense?

A final thought [at last, Adrian thinks :)]
I haven't checked this, but... Couldn't you set up a common 'bind'
statement for the tabs where a left mouse button click on a tab will carry
out a 'select' action on that tab? I would think,logically, that
the 'select' action would automatically raise the <<NotebookTabChanged>>
virtual event. You might want to check if that works. If so, then I think
you have a simple solution for what you want to achieve. You might need to
use a flag variable to stop a refresh cascade occurring - just talking off
the top of my head; not sure if that would actually happen.

Could you please 'report back' and let us know how that approach works,
assuming that you're happy to go that way?

In any case, all the best with the project.

Rob.

.


Loading