Re: How to popup a window when click a button on gtkmm?
- From: Fredrik Arnerup <e97_far e kth se>
- To: juanfran ugenawireless org es
- Cc: gtkmm-list gnome org
- Subject: Re: How to popup a window when click a button on gtkmm?
- Date: Wed, 03 Nov 2004 12:41:32 +0100
ons 2004-11-03 klockan 09:09 +0100 skrev juanfran ugenawireless org es:
> void MainWindow::button_clicked()
> {
> Gtk::Window popupwindow.
> popupwindow.set_size_request(800,600);
>
> show_all_children();
>
> }
There are two major errors in this code.
1. You can't declare popupwindow as a local variable, because it will be
destroyed as soon as you leave button_clicked. You have do use dynamic
allocation, or make it a global variable or a member of a class.
2. popupwindow is not a child of MainWindow, so you will have to do
popupwindow.show_all() instead.
--
Fredrik Arnerup <e97_far e kth se>
http://www.stacken.kth.se/~foo/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]