Re: notebook: disable tabs?



I want to disable just the tabs which don't apply in the current
context, not all of them.

-M

otaylor redhat com wrote:

otaylor redhat com writes:

Michael Rothwell <rothwell holly-springs nc us> writes:

Is there a way to disable tabs in a notebook, so that they still show,
but nothing happens when you click on them?

Well, yes, there is, with some hackery, but I doubt I should
tell you what it is.

Notebook tabs are for use for switching pages. If you have
notebook tabs, your users will try to use them for switching
pages. If the tabs don't switch pages, then your users will
undoubtably get frustrated and confused.

Regards,
                                        Owen

PS - Not to be completely unhelpful, the way to disable clicking
on the tabs would be to intercept button press events - do

static gboolean
stop_func (GtkWidget *widget, GdkEventButton *event)
{
  gtk_signal_emit_stop_by_name (widget, "button-press-event");
  return TRUE;
}

 gtk_signal_connect (GTK_OBJECT (notebook), "button-press-event",
                     GTK_SIGNAL_FUNC (stop_func), NULL);

But still, just don't do it.
                                        Owen

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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