GtkLabel inside an eventbox



Hi !

I've decided to try to write some silly programs with Gtk+, and I want
to make `xclock -d' clone. I'm putting GtkLabel inside an eventbox to
catch moushe clicks so that window will be closed after clicks [at
first, it was button not label-in-the-box :-) ]. This works fine,
however, I can't understand why Window is bigger than actual text is,
or, rather, taller [width are same, and button seen to behave
similarly]. What can be done with it ??

I've done
        GtkWidget * w, *b, *l, *e; // window, box, label, eventbox
        ...
        gtk_container_set_border_width (GTK_CONTAINER (w), 0);
        gtk_container_set_border_width (GTK_CONTAINER (e), 0);
        ...

but this doesn't help.

What should I do, if it's possible at all ?




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]