Re: Keeping window on top.



<martyn 2 russell bt com> wrote:

I have a drawing tool with a floating menu (similar layout to 
the gimp).
The drawing area must occupy the entire screen so I need to 
have the menu
on top of the drawing window at all times. Will the "modal" 
attribute help?
It seems like this would also capture all the focus.

Modal will do the job, if you don't want it to be modal and just want
it to be on top of a particular window, use
gtk_window_set_transient_for() seen here:
http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-transient-for

Keep in mind that you can't actually draw in the drawing area while your
floating menu is visible if it's modal. (That's what modal windows are
designed for.) Therefore you should avoid modal windows for your case.
Rather use gtk_window_set_transient_for () indeed.



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