Key Pages

Projects

A basic statusbar can be accomplished using just a label, i.e. using its -textvariable option to change the message, using a sunken relief, etc.

But things can sometimes be more complicated; multiple areas etc. A simple statusbar wrapper done as a megawidget would be a good easy solution to this. (Side note: Windows puts a resize handle at the end of the status bar.)

One illustration:
Bryan Oakley: The statusbar that I use typically has two - four areas for information. One area usually has branding (company logo), one for byte counts or numer of lines or items or whatnot, and one is for transient messages.

The API, FWIW, goes something like this:

    statusbar .statusbar
    .statusbar add logo -side right -image logo.gif
    .statusbar add files -side right -width 12
    .statusbar add main -side left
    ....
    .statusbar puts files "$N files"
    ....
    .statusbar puts main "updating database..."

Posted at Aug 14/2003 12:16 PM:
Mark Roseman: might the statusbar also have a progress bar area too? I'm kinda inclined to suggest that maybe progress bar should be a bit higher priority than it is now anyway..


Posted at Aug 14/2003 01:21 PM:
Bryan Oakley: Yes, a progress bar or animated image of some sort. And a grab handle (on windows, anyway...).


Posted at Aug 14/2003 09:08 PM:
Brian Griffin: I've had to implement all this in our application, progress bar, multiple sunken labels, blinking indicators, and a grab corner! Even have a popup history of messages. Compared to other things, this stuff is easy.

However, I wonder if this stuff should be incorporated into a toplevel application frame as mentioned in Out of Box Experience so you get a basic status bar without any work.

Posted at Aug 15/2003 12:46 PM:
Mark Roseman: YES! YES! YES! YES! YES!

Posted at Aug 16/2003 03:10 PM:
DKF: No. Or at least not toplevel itself as it serves too many other masters. If you want to build a megawidget to do it, I'll not stand in your way.


Posted at Aug 15/2003 02:02 PM:
Bryan Oakley: Is this application framework something you want in the core, or just wishful thinking that somewhere there needs to exist a framework?

I'd be happy to be the one to contribute an application skeleton if it was agreed something like this should go in the core. Since it's more of a template rather than a tk command I'm not sure how it would be packaged, but that's a minor detail. For instance, would it ship as a file in the core distribution one could copy and edit, or exist as a tk command (eg: tk_appframework . -title "Hello, World")?

Perhaps this is a topic better discussed on a separate page: Application Framework



Forum Home  -  Site Home  -  Find Pages: