Re: Setting frametype of any widget
- From: Owen Taylor <otaylor redhat com>
- To: Havoc Pennington <hp redhat com>
- Cc: Fredrik Rambris <fredrik rambris com>, GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: Setting frametype of any widget
- Date: 11 Jan 2001 23:57:48 -0500
Havoc Pennington <hp redhat com> writes:
Fredrik Rambris <fredrik rambris com> writes:
Sorry.. I mean GtkShadowType
Right. There's gtk_button_set_relief(), which will turn off the
bevel. You can't do SHADOW_IN or anything though.
If you want more, the only thing you can do is override the
expose_event and draw handlers for the button; the two ways to do that
are to connect to those signals and emit_stop_by_name() to keep the
default handlers from running, or to create a full-blown GtkObject
subclass. Unfortunately you have to replace all the drawing code, not
just the frame drawing code, with that approach.
Or, you can simply put the widget inside a GtkFrame.
Generally for things like shadow types, padding, etc, GTK+
goes with a "decoration" model, where you put the widget into
another widget which adds the shadow drawing or padding, instead
of trying to put every feature in every widget.
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]