Add something to the statusbar

@nathanr I’m trying to update my EOL widget.
But when i investigate the statusbar with the DOM inspector I can’t see any id’s or classes:


What’s the best approach for adding element to the stausbar?

As of Komodo 10 the statusbar is part of the view binding, meaning every buffer has its own statusbar. So you’ll probably want to listed to “current_view_changed” and add your panel if it doesn’t already exist.

Here’s a sample snippet that adds a test statusbarpanel:

var view = $(require("ko/views").current().get());
var customPanel = $("<statusbarpanel label='test'/>");
view.findAnonymous("anonid", "statusbar-encoding").before(customPanel);

Be careful - don’t depend on “statusbar-line-col” or “statusbar-selection”, as they are scheduled to change for Komodo 10.0.1 for a bug fix.

2 Likes

Ah Thanks :thumbsup: