473,325 Members | 2,308 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Trigger pygtk drawingarea redraw

Hi,

Does anybody know the fastest way to trigger a DrawingArea redaw in
pygtk? At the moment, I'm using a bit of a hack:

def redraw(self):
self.area.hide()
self.area.show()

Is there a better way to trigger a redraw? This causes flickering when
the window gets bigger than 400x400 pixels, which is a nuisance...
there must be a better way of clearing the area and letting it redraw
itself?
Many thanks for any help,

Alex

Jul 28 '05 #1
2 3466
Call the gtk.Widget method queue_draw(); if you derive from DrawingArea
then simply:

self.queue_draw()

Of if the DrawingArea is some kind of "has-a" member:

self.DrawableThing.queue_draw()

On Thu, 2005-07-28 at 02:52 -0700, ch424 wrote:
Hi,

Does anybody know the fastest way to trigger a DrawingArea redaw in
pygtk? At the moment, I'm using a bit of a hack:

def redraw(self):
self.area.hide()
self.area.show()

Is there a better way to trigger a redraw? This causes flickering when
the window gets bigger than 400x400 pixels, which is a nuisance...
there must be a better way of clearing the area and letting it redraw
itself?
Many thanks for any help,

Alex


Jul 28 '05 #2
Ahh.. fantastic! Flickers be gone! Yaarrrg!

It was "self.area.queue_draw()" in case anyone wants to know. :)

Thanks so much!

Alex

Jul 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Arne Schwabe | last post by:
hi, I am using python and pygtk. In my program I want to realize a status thing with a DrawingArea. But my problem is that this area is not updated while my program is running. Is there a way I...
4
by: j_mckitrick | last post by:
Hi all. Here is a tiny container for one of each combo box, along with the glade file. Just 2 widgets, so hopefully not too large. How the heck do I get the selection from the ComboBox, as...
7
by: Domenique.Tilleuil | last post by:
hello, Is there an event simular to the java event onMouseOver ? I want to get the coordinates of the mouse pointer when it is over an image ( GTKImage widget) I've tried using the EventBox...
25
by: TPJ | last post by:
GUI's etc: PyGtk on Windows "(...) So if someone develops mainly for X and just wants to make sure that it is not impossible to run on Windows, you can use PyGTK. (...)", July 2nd, 1999 pyGTK...
2
by: ivan.dm | last post by:
Hi all. in this sentence: self.area = gtk.DrawingArea() self.style = self.area.get_style() self.gc = self.style.fg_gc where can I find about style and its property? thanks
1
by: Rafa³ Janas | last post by:
Is somebody try to paint filled boxes in drawingarea? I don't know how to paint line or someting like this. Maybe somebody have tutorial or samples? Thanks Rafal
1
by: krishnakant Mane | last post by:
hello, I will be writing some code in PyGTK to run on linux. but I want to know if there are any installers or distutils available for PyGTK on windows? I have heard that installing gimp or even...
0
by: Michael Palmer | last post by:
On Sep 16, 12:30 pm, binaryjesus <coolman.gu...@gmail.comwrote: I haven't tried it myself, but I came across a blog post the other day that describes a way of building windows installers for...
1
micmast
by: micmast | last post by:
Ey all, I'm currently working on an application that uses the pygtk libraries to create windows and widgets. I have a HBOX (2 boxes) in the middle and in the left one I have a treeview, in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.