Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python and Glade

Status
Not open for further replies.

slackwalker

Programmer
Jul 14, 2004
1
IT
Good Morning,

I have a probem with python. I have created a new widget with a button. When I clik on it, compares a new window, but
the problem is that no one of its button functions!

What's wrong in my code??

Thanks to all

############ EXAMPLE CODE ############################

#!/usr/bin/env python

# import dei moduli di interesse
import gtk
import gtk.glade

# Carica Interfaccia Glade
mainGlade = gtk.glade.XML("progetto.glade")

# Carica finestra Principale
wind = mainGlade.get_widget("mainWindow")

# Funzione per aprire la nuova finestra Database
def openDbWindow(obj):
wind.hide()
database = gtk.glade.XML("database.glade")
return

def aboutSw(obj):
about = gtk.glade.XML("about.glade")
return

# Collegamento eventi
dic={
"on_mainWindow_delete_event":gtk.mainquit,
"on_quit1_activate":gtk.mainquit,
"on_about1_activate":aboutSw,
"on_bt_db_clicked":eek:penDbWindow
}
# Connessione delle callback
mainGlade.signal_autoconnect(dic)

gtk.main()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top