Re: Howto set maximum window size ?
- From: Bob Caryl <bob fis-cal com>
- To: Nil Gradisnik <ghaefbgtk gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Howto set maximum window size ?
- Date: Wed, 01 Jun 2005 10:30:01 -0500
Nil Gradisnik wrote:
I found this windows function:
Gtk::Window::set_geometry_hints (Widget& geometry_widget, const
Gdk::Geometry& geometry, Gdk::WindowHints geom_mask)
I could use this to set the window maximum size, right ?
Beacause I see that Gdk::WindowHints has HINT_MAX_SIZE enumeration.
Now I have no idea how to use this in practise...
Gtk::Window window;
window.set_geometry_hints(window, ????, HINT_MAX_SIZE); maybe ?
Thanks
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list
Check this out:
http://gtkmm.org/gtkmm2/docs/reference/html/classGtk_1_1Window.html#a53
The syntax of your resulting call will be like this:
Gtk::Window window;
Gdk::Geometry geometry;
geometry.max_height = 600; // or whatever value you wish
geometry.max_width = 800; // or whatever value you wish
window.set_geometry_hints(
window.gobj(),
// g_obj returns the widget that Gdk wants to see
geometry,
// the desired geometry description
Gdk::HINT_MAX_SIZE //
indicates the geometry structure field to use
);
Hopes this helps.
Sincerely,
Bob Caryl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]