Re: Invoking a popup on a Gtk::Window ( Gtk::WindowType ( Gtk::WINDOW_POPUP ) )
- From: Joaquim Duran <joaquimduran adtelecom es>
- To: Sai <rsaikamesh gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Invoking a popup on a Gtk::Window ( Gtk::WindowType ( Gtk::WINDOW_POPUP ) )
- Date: Thu, 24 Apr 2008 14:29:08 +0200
Hello,
En/na Sai ha escrit:
Actually I have used Gtk::manage() to invoke the second pop up.
The code is like:
second_popup = Gtk::manage ( new Gtk::Window( Gtk::WINDOW_POPUP ) );
second_popup->set_position ( Gtk::WIN_POS_CENTER_ON_PARENT);
second_popup->set_transient_for ( *this );//this refers first pop up
second_popup->set_modal(true);
second_popup->show_all();
You should add this line, after your code:
Gtk::Main::run(*second_popup);
Note: from the code that you've write, if from first_popup should shown
many second_popup windows (not all them at the same time but one after
another), you could waste many memory, because the second_popup windows
will not be removed till fist popup_window is destroyed. Another options
is create the second_popup once and show it as many times are needed.
Joaquim Duran
second_popup is declared in the header file as:
Gtk::Window *second_popup;
On Thu, Apr 24, 2008 at 4:40 PM, Joaquim Duran
<joaquimduran adtelecom es <mailto:joaquimduran adtelecom es>> wrote:
En/na Sai ha escrit:
Regardless of whether set_transient_for() is used or not, the
pop up doesn't get popped up.
On Thu, Apr 24, 2008 at 3:51 PM, Murray Cumming
<murrayc murrayc com <mailto:murrayc murrayc com>
<mailto:murrayc murrayc com <mailto:murrayc murrayc com>>> wrote:
On Thu, 2008-04-24 at 13:15 +0530, Sai wrote:
> Hi,
>
> I have created a Gtk::Window as Gtk::Window ( Gtk::WindowType
> ( Gtk::WINDOW_POPUP ) ). That means it is a pop up window.
There is a
> button added on this window, when this button is clicked
another pop
> up window needs to be popped up. It does not get popped up
right now.
> How do we make this work. Please gibe me some ideas.
Are you using set_transient_for().
I'm not actually sure if a popup window can show a popup
window. But if
you don't make progress then a simple test case might help
people to
help you.
--
Have you tried to call:
second_popup.show_all_children();
Gtk::Main::run(second_popup)
from the first_popup window member function?
Joaquim Duran
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]