Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4886 > unrolled thread
| Started by | Даниил Рыжков <daniil.re@gmail.com> |
|---|---|
| First post | 2011-05-07 15:14 +1100 |
| Last post | 2011-05-07 08:11 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: PyGTK, Glade/libglade. What am I doing wrong? Даниил Рыжков <daniil.re@gmail.com> - 2011-05-07 15:14 +1100
Re: PyGTK, Glade/libglade. What am I doing wrong? Alister Ware <alister.ware@ntlworld.com> - 2011-05-07 08:11 +0000
| From | Даниил Рыжков <daniil.re@gmail.com> |
|---|---|
| Date | 2011-05-07 15:14 +1100 |
| Subject | Re: PyGTK, Glade/libglade. What am I doing wrong? |
| Message-ID | <mailman.1284.1304741651.9059.python-list@python.org> |
Thanks, Cristian! It works.
> List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
Thanks again. Subscribed :)
2011/5/7 craf <pyclutter@gmail.com>:
> Hi.
>
> Try this:
>
> #!/usr/bin/env python
>
> import gtk.glade
>
> class TestPyGtk:
> """This is an Hello World GTK application"""
>
> def __init__(self):
>
> #Set the Glade file
> self.gladefile = "test.glade"
> self.glade = gtk.glade.XML(self.gladefile)
>
> self.MainWindow = self.glade.get_widget('MainWindow')
> self.MainWindow.show()
> self.MainWindow.connect('destroy', lambda e:gtk.main_quit())
>
>
>
> TestPyGtk()
> gtk.main()
>
> Regards.
>
> Cristian.
>
> List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
--
Best wishes,
Daniil
[toc] | [next] | [standalone]
| From | Alister Ware <alister.ware@ntlworld.com> |
|---|---|
| Date | 2011-05-07 08:11 +0000 |
| Message-ID | <097xp.16$_T5.11@newsfe02.ams2> |
| In reply to | #4886 |
On Sat, 07 May 2011 15:14:07 +1100, Даниил Рыжков wrote:
> Thanks, Cristian! It works.
>> List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
> Thanks again. Subscribed :)
> 2011/5/7 craf <pyclutter@gmail.com>:
>> Hi.
>>
>> Try this:
>>
>> #!/usr/bin/env python
>>
>> import gtk.glade
>>
>> class TestPyGtk:
>> """This is an Hello World GTK application"""
>>
>> def __init__(self):
>>
>> #Set the Glade file
>> self.gladefile = "test.glade"
>> self.glade = gtk.glade.XML(self.gladefile)
>>
>> self.MainWindow = self.glade.get_widget('MainWindow')
>> self.MainWindow.show()
>> self.MainWindow.connect('destroy', lambda e:gtk.main_quit())
>>
>>
>>
>> TestPyGtk()
>> gtk.main()
>>
>> Regards.
>>
>> Cristian.
>>
>> List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
you may also want to look at using gtk.builder instread as it is now the
prefered option.
--
The human mind ordinarily operates at only ten percent of its capacity
-- the rest is overhead for the operating system.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web