RE: [gtk-list] notebook pages & callbacks?
- From: Stefan Jeske <jeske braunschweig netsurf de>
- To: gtk-list redhat com
- Subject: RE: [gtk-list] notebook pages & callbacks?
- Date: Sat, 11 Apr 1998 15:27:28 +0200 (CEST)
On 11-Apr-98 Jorgen Pehrson wrote:
> Hi,
> I have created a notebook which contains three pages. Now I would like to
> connect a callback function to one of the pages, so when the user clicks
> on the page tab it should first perform my callback function. How do I do
> that?
> Can I just use "gtk_signal_connect", and if I can, what object do I
> connect the signal to?
Try the following :
gtk_signal_connect (GTK_OBJECT (notebook), "switch_page",
(GtkSignalFunc) page_switch, NULL);
together with :
static void
page_switch (GtkWidget *widget, GtkNotebookPage *new_page, gint page_num)
{
if (page_num == your_page_num)
{
/* your code */
}
}
bye,
Stefan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]