Hello, I am still rather new to Gtk and have a problem (obviously). I have been defining the size of a main_window and the window's size does not change. Anyhow, I am hoping someone can help me.

main_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
                  gtk_window_set_title(GTK_WINDOW(main_window), main_title);
                  gtk_window_set_position(GTK_WINDOW(main_window), GTK_WIN_POS_CENTER);
                  gtk_window_set_default_size(GTK_WINDOW(main_window), 800, 200);

Recommended Answers

All 2 Replies

I don't know a lot about gtk, but i'm using wxwidgets, and your code looks like the code in wxwidgets, and to change the size I use the set_size to, but I do to a "always_maximize" condition to make the size as I wanna.

I don't thinks I help a lot, but I try =]

This might not work.
set_default_size() mainly sets the size which can be ignored if the windows size request is larger than the dimensions, assuming that the size is larger than that of window size that you have assigned with set_default_size(); just wont work.

I may be wrong as I have very minimum programming experience with GTK.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.