[pygtk] Labels not read at first by GNOME Orca screen reader
Mírian Bruckschen
cleo.sl at gmail.com
Tue Oct 23 10:10:50 WST 2007
Hi all,
I'm not sure which is the right mailing list to post that. If it's not
here, please let me know.
I'm using Python and PyGTK to build my application, and I'm having an
issue with my gtk.Label's and GNOME Orca screen reader. I have several
windows, one activated after the other, and all of them have the
following "layout": an ImageContainer, a Label and two Buttons (in
fact, is the same window, with different image and label values at a
time).
Orca reads well and nicely the first window. Then, I press enter.
Enter is programmed to change the label's text and the image.
Everything goes well, except for the fact that Orca doesn't read the
second label, unless I change the focus to another component (one of
the buttons, for example) and re-focus on it. The focus seemed to be
grabbed (the label text appears selected), but nothing is read.
I'm using the following code to set the label text (and some
formatting), and to grab the focus. Is there anything I'm missing, or
may try to discover what I'm doing wrong?
def changeText(game, widget_name, text):
# --
label_widget = game.get_widget(widget_name)
label_widget.set_line_wrap(gtk.WRAP_WORD)
label_text = text
label_widget.set_markup('<span size="18000">'+label_text+'</span>')
label_widget.set_use_markup(True)
label_widget.set_selectable(True)
# --
label_widget.grab_focus()
Thank you very much for any comments,
--
Mírian Bruckschen
More information about the pygtk
mailing list