I create a GTK window, which for various reasons I want to make without modification by the user. But calling the set_resizable method on the window causes it to display at a size of 1 pixel by 1 pixel. (jn in the code below, the window displays the expected size if the line with the variable parameter is commented out). It doesn't matter which order is invoked by resizing and set-resizable.) Is there anything else that needs to be done?
Here is the code ...
#include <iostream>
#include "myarea.hpp"
#include <gtkmm/main.h>
#include <gtkmm/window.h>
int main(int argc, char** argv)
{
Gtk::Main kit(argc, argv);
Gtk::Window win;
win.set_title("DrawingArea");
win.resize (600, 600);
MyArea area;
win.add(area);
area.show();
Gtk::Main::run(win);
return 0;
}
source
share