Resizing Buttons with PyGTK / Glade

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

 



Hello list -

I'm having a strange issue with PyGTK and Glade.  I have a bunch of buttons
in a table which have a text label, which is blank by default (in the
.glade file).  My app, as it starts up, populates the text labels.  For
some reason, given a certain layout, when I'm populating the labels, the
buttons don't automatically resize themselves to fit the new text I'm
putting in the buttons, so only the first character or two is displayed in
the button.

Oddly enough, as soon as I click on *any* one of the buttons on the screen,
all of them suddenly resize themselves to the appropriate width.

I've been paring down my structure to find the root cause, and there seem
to be two preconditions to this behavior:

  1) The buttons are inside a scrolledwindow / viewport
  and
  2) It must be in a notebook, NOT on the first page, though.

If I remove the scrolledwindow/viewport, then the buttons resize
automatically just fine, and likewise if I move that content to the front
page.  With both of those in place, though, I see the behavior that I'm
seeing.  Unfortunately, in this case I do need to have the scrolledwindow
in place, and also it needs to be on a non-first-page notebook.

For example, here's a .glade and .py which illustrate the behavior:

  http://apocalyptech.com/linux/pygtk-issue/testing.glade
  http://apocalyptech.com/linux/pygtk-issue/test.py

And some screenshots.  First, the initial screen, before I click any
buttons:

  http://apocalyptech.com/linux/pygtk-issue/pygtk-issue-1.png

Then, after I click any of the buttons on that page, I get what's expected:

  http://apocalyptech.com/linux/pygtk-issue/pygtk-issue-2.png

... so all in all, it's quite mystifying to me.  Any ideas would be
appreciated.

Some possibly-relevant version information:
  gtk+ 2.12.5
  Glade 3.4.5
  PyGTK 2.10.4

Thanks!

-CJ

-- 
WOW: Flemmy            |   "Happiness isn't good enough for me!  I
pez@xxxxxxxxxxxxxxxx   |              demand euphoria!"
24.24.2.3171           |                  - Calvin
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux