[Glade-users] how to build an application with multiple "pop up" windows

On Mon, 2005-05-16 at 23:10, Neville C. Dempsey wrote:
On Mon, 2005-05-16 at 22:03, y g wrote:
an easy way to illustrate that is let's just say i have window1 with
just one button which when you click it it shows window2 which has a
form and an ok button to close it.... now as there quite a few
questions that i have is there anywhere some documentation about

I could probably do it in 5 lines, but then it would be too crowded.

Here is the same program using python's lambda (unnamed) procedures:
#!/usr/bin/env python
# run glade-2 to create TWO windows, then TWO buttons, 
import gtk.glade;
project1.get_widget("button1").connect("clicked",lambda dummy: window2.show()),
project1.get_widget("button2").connect("clicked",lambda dummy: gtk.main_quit()),

4 statements....  That can be merged into just one line.

You could label the buttons, "hello world", "hello moon" to legitimise
the program.

Neville C. Dempsey <nevillednz dot glade at 3ttechnology dot com>

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