tags:

views:

141

answers:

4

If I make a Statusbar, and PackEnd a Label to it, it looks something like this:

alt text

The Shadow disappears over the Label, but remains over the rest of the Statusbar. I want to remove the Shadow from the entire Statusbar. The PyGTK documentation mentions a property called shadow-type, but it's readonly, and nowhere to be found in GTK#. How do I get rid of this shadow?

A: 

why don't you just use a hbox for that?

Alexey Yakovenko
Well, I could as a last resort, but I plan to set the status of the `Statusbar`, as well as the `Label` in the right.
Matthew
+1  A: 

shadow-type is a style property, which means it's actually supposed to be set by the user and/or desktop theme. You can set it by writing a custom style file for your application and reading it in using gtk.RcStyle.

If you have a need for two separate status messages in your application, you could also consider packing two status bars into an hbox.

ptomato
+1  A: 

You're not supposed to pack stuff into the statusbar, it's not meant as a general container.

To display text in a status bar, use its own API, i.e. gtk_statusbar_push() from C. The GTK# docs on go-mono.com seem to be offline, so I couldn't link to those right now.

unwind
+1  A: 

The first child of a GtkStatusbar is a GtkFrame which gives the shadow border (edit: apparently not). You should be able to do this:

statusbar.get_children()[0].set_shadow_type(gtk.SHADOW_NONE)

Several apps (most notably Epiphany and, in the past, Galeon) actually replace the contents of that frame with an HBox so they can add stuff to the statusbar.

Johannes Sasongko
This doesn't seem to work. The first child of Statusbar is a Frame, and you can set its shadow type, but the line above the statusbar remains. It must be something other than a shadow.
Matthew