Re: Dialog Position



In the dialog contructor, use:

set_position(Gtk::WIN_POS_CENTER_ALWAYS);

Help this helps.

Bob Caryl

Surya Kiran Gullapalli wrote:
Hi all,
I'm writing a small application on windows using gtkmm.
I'm facing one wierd problem. When ever i open a dialog, by clicking a button on my main window, the dialog box, that is opened is positioned at the top left corner of my display.

Actually this dialog has been subclassed from Gtk::Dialog. I've overridden on_show method to look like this
==========
MyDialog :: on_show()
{
     set_position (Gtk::WIN_POS_CENTER_ON_PARENT) ;
     Gtk::Dialog::on_show() ;
}
===========

I'm invoking dialog like this

MyDialog *d = new MyDialog (static_cast<Gtk::Window*>(get_parent()), ...)

where the first argument is being used by the MyDialog constructor to set it as its parent.

This code works fine on linux. But on windows, the dialog position is always screwed up.

Am I Missing something here.

Thanks in advance,
Surya



_______________________________________________ gtkmm-list mailing list gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]