473,804 Members | 3,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3499
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.DrawableTh ing.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.queu e_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
5995
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 can force pygtk to refresh to widgets? Arne
4
2604
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 opposed to the ComboEntryBox? I'm pulling my hair out over this one! jonathon
7
6644
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 with the motion_notify but that only seems to work when the mouse is pressed ?
25
4287
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 on Windows "(...) > can i use pyGTK under > Windows???
2
1520
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
1578
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
1782
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 pygtk is next to impossible and is very tedious if at all one gets success. can any one share their experiences with installing and running pygtk on windos? any links for downloading proper packages will be highly appreciated. regards,...
0
1788
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 pyGTK applications at http://unpythonic.blogspot.com/2007/07/pygtk-py2exe-and-inno-setup-for-single.html
1
2957
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 right the rest (drawingarea, entries, labels, notebooks, ...). But, as usual, the big hbox is divided exactly in the middle and I was wondering if it is possible to make sure that the left hbox doesn't use more then an amount of pixels. I tried looking...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10321
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7620
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.