Re: [gtkmm] Gtk::Window



On Tuesday 27 January 2004 1:21 pm, Alexander Bussman wrote:
> Hi!
> I wonder if it's a way to lock the application until a newly created
> window is closed.
> I need to do that because I want to grab a string from that window (that
> the user writes).
>
> something like this I mean:
> ...
> mywindow.show();
> wait_until_mywindow_is_closed();
> std::string data = mywindow.getData();
> ...

In the constructor of the new window put something like this (where 'parent' 
is a reference to the application window):

  set_transient_for(parent);
  parent.set_sensitive(false);
  set_modal(true);

Chris.





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