Re: Scroll windows does use all of the content area
- From: Richard Gipps <rgipps netspace net au>
- To: gtk-app-devel-list gnome org
- Subject: Re: Scroll windows does use all of the content area
- Date: Thu, 29 Mar 2012 21:25:29 +1100
Where I mentioned "action area" in the email below I actually meant
"content area"...
I am currently updating an application I had written for GTK+2 to work
with GTK+3. This work is being done on Windows XP with GTK version 3.2.1.
Previously, the following code produced a scrollable window which took
up the whole "action area" of the dialogue box
License_wnd = gtk_dialog_new_with_buttons("License",
NULL,
GTK_DIALOG_MODAL,
GTK_STOCK_OK,
GTK_RESPONSE_NONE,
NULL);
gtk_widget_set_size_request(License_wnd,640,420);
gtk_window_set_resizable(GTK_WINDOW(License_wnd),FALSE);
gtk_window_set_position(GTK_WINDOW(License_wnd),GTK_WIN_POS_CENTER);
License_wnd_scroll = gtk_scrolled_window_new(NULL,NULL);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(License_wnd)->vbox),License_wnd_scroll);
I have changed the code to use the new content area concept (see
below) and now the height of the scroll windows no longer takes up the
whole "action area" of the dialogue box.
License_wnd = gtk_dialog_new_with_buttons("License",
NULL,
GTK_DIALOG_MODAL,
GTK_STOCK_OK,
GTK_RESPONSE_NONE,
NULL);
gtk_widget_set_size_request(License_wnd,640,420);
gtk_window_set_resizable(GTK_WINDOW(License_wnd),FALSE);
gtk_window_set_position(GTK_WINDOW(License_wnd),GTK_WIN_POS_CENTER);
License_wnd_scroll = gtk_scrolled_window_new(NULL,NULL);
content_area = gtk_dialog_get_content_area(GTK_DIALOG(License_wnd));
gtk_container_add(GTK_CONTAINER(content_area),License_wnd_scroll);
Should I be setting an additonal property now to make the scroll
window fill up the "action area"?
Richard.
_______________________________________________
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]