window resizing
- From: Richard Gipps <rgipps netspace net au>
- To: gtk-app-devel-list gnome org
- Subject: window resizing
- Date: Wed, 30 Jun 2004 20:50:31 +0100
I am developing an application using GTK+ 2.4.1 for windows and I have some
code to create a dialog box with resizable set to FALSE, yet I can still
resize the window (in the verticle direction only) by a small amount and I
can not work out why? Here is the code:
GtkWidget* create_Start_up_wnd(void)
{
GtkWidget* Start_up_wnd;
char Start_up_wnd_text[500] = "/0";
GtkWidget* Start_up_wnd_label;
GtkWidget* Start_up_wnd_fixed;
Start_up_wnd = gtk_dialog_new_with_buttons("P-Syn",
NULL,
GTK_DIALOG_MODAL,
GTK_STOCK_OK,
GTK_RESPONSE_OK,
NULL);
gtk_window_set_position(GTK_WINDOW(Start_up_wnd),GTK_WIN_POS_CENTER);
gtk_window_set_resizable(GTK_WINDOW(Start_up_wnd),FALSE);
//Create fixed area
Start_up_wnd_fixed = gtk_fixed_new();
gtk_widget_set_usize(GTK_WIDGET(Start_up_wnd_fixed),462,195);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Start_up_wnd)->vbox),Start_up_wnd_fixed);
sprintf(Start_up_wnd_text,"\n P-Syn Version %s, Copyright (C) 2004
Richard Gipps\n\n P-Syn comes with ABSOLUTELY NO WARRANTY; for
details\nselect Help -> Warranty from the P-Syn main menu. This is free\n
software, and you are welcome to redistribute it under certain\nconditions;
select Help -> Distribution from the P-Syn main menu.",P_SYN_VERSION);
Start_up_wnd_label = gtk_label_new((gchar*)Start_up_wnd_text);
gtk_fixed_put(GTK_FIXED(Start_up_wnd_fixed),Start_up_wnd_label,28,28);
//Connect signal to the OK button
g_signal_connect(GTK_OBJECT(Start_up_wnd),
"response",
G_CALLBACK(On_Start_up_wnd_OK_button_clicked),
NULL);
return Start_up_wnd;
}
Richard.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]