I'd like to set a text into Drawing Area object, using pygtk. So, I created a drawing area and set up a callback function using "expose event" signal. Then I coded a function to set the text. What I coded is:
self.pangolayout = self.movie_window.create_pango_layout("")
...
self.pangolayout.set_text("Text here")
where "movie_windows" is a DrawingArea object. I got no error, but nothing is written on the drawing area. SuggestionS?
FB
Did you draw the layout to the window?
The third example of this tutorial uses pango layout: http://zetcode.com/tutorials/pygtktutorial/pangoII/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.