Domanda

Using glade 3.8 , i created a hbox and I name the object as hboxvideo. In my program , I add a drawing area to hbox video.

self.hboxvideo = self.builder.get_object("hboxvideo")
self.video_drawing_area=gtk.DrawingArea()
self.hboxvideo.pack_start(self.video_drawing_area,True,True,0)
self.video_drawing_area.connect("expose-event", self.area_expose_cb)

The problem is drawing area never signals "expose-event". Also these statements are called only after the main window is exposed. Any one how can I solve this issue ?

Thanks in advance, Thothadri

È stato utile?

Soluzione

I got the answer. When I imported hbox from glade and if you dynamically add widgets to it you need to show them. But if glade is not used, you just have to do window.show_all() once. In the case of glade everytime i add a dynamic widget using hbox, i need to show them.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top