473,795 Members | 3,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

wxpython : wxDc and Refresh() = flash

Juste a simple question about the DC in wxpython ...

I've made a wxWindow class, where i need to paint myself the content.
so i've added an evt_paint() to draw in the wxPaintDC ...
It works like a charm !! superb

To trigg the painter event, in some codes, i use the Refresh() method
It works greatly !

But the trouble is :

i found it flash a lot my wxwindow, when i trigg the painter ...
(i see speed "drawing horizontal line" .. which make the screen seems to
flash (i don't know how to describe that, but that flash my screen ;-) ))

Here are my questions :

- is there a way to wait for an "vertical top" to draw the content (to
synchronize with the screen redraw) ?
- is there a way to implement a double-buffering system, to let the redraw
be smoother ?

in an another way : how to skip theses flash redraw ?
Jul 18 '05 #1
2 5382
marco wrote:
Juste a simple question about the DC in wxpython ...

I've made a wxWindow class, where i need to paint myself the content.
so i've added an evt_paint() to draw in the wxPaintDC ...
It works like a charm !! superb

To trigg the painter event, in some codes, i use the Refresh() method
It works greatly !


Two points
1) you would do well to subscribe to the wxPython news group, they
specifically handle wxPython related issues and you will have a better
shot at getting the right answer.

http://wxpython.org/maillist.php

2) In the demos supplied by wxPython, see the wxScrolledWindo w example.
They show how to use a double buffering screen that will help prevent
the flashing screen when it is being redrawn. Just look for

if BUFFERED:

in the code. If you don't have access to this, I'll send it to you.

Brian

Jul 18 '05 #2
> > Juste a simple question about the DC in wxpython ...

I've made a wxWindow class, where i need to paint myself the content.
so i've added an evt_paint() to draw in the wxPaintDC ...
It works like a charm !! superb

To trigg the painter event, in some codes, i use the Refresh() method
It works greatly !
Two points
1) you would do well to subscribe to the wxPython news group, they
specifically handle wxPython related issues and you will have a better
shot at getting the right answer.

http://wxpython.org/maillist.php


sure ... and i've already subscribe to it
2) In the demos supplied by wxPython, see the wxScrolledWindo w example.
They show how to use a double buffering screen that will help prevent
the flashing screen when it is being redrawn. Just look for

if BUFFERED:

in the code. If you don't have access to this, I'll send it to you.

Brian


thanx a lot ...
i've got the demo, and got access to the code ...
(i use it a lot, but never see an example to disabled this flashed
rendering)

i will use it ...
thanx for your answer ...
Jul 18 '05 #3

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

Similar topics

3
4516
by: Steve Lamb | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, this one I did try before coming here... :) I am trying to report the status of what is going on to the status bar of the main window of my wxPython app. I know I'm on the right track with SetStatusText() but it doesn't always alter the text. What the program is doing is taking a filename and passing it through two different external programs. One of them is taking a little bit of...
8
7622
by: Jonathan Daugherty | last post by:
Does anyone here know if the wxImage class in wxPython supports dislaying images from URLs? -- Jonathan Daugherty http://www.cprogrammer.org "It's a book about a Spanish guy called Manual, you should read it." -- Dilbert
0
1380
by: plumpy321 | last post by:
Hi, I took an example from wxPython with the IE web browser and created a refresh button to automatically refresh a web page in 5 second intervals. But I notice that the memory utilization in Python keeps increasing over time. Can anyone tell me why this is happening? Here is my code: ============================================================================
8
5123
by: Jan Danielsson | last post by:
Hello all, I wanted to plot some statistics, so I wrote a simple wxPython class to do it. Then I realized that I would like to draw bar graphs, so I added that too. Since I'm a complete Python newbie, I haven't done much of it the "Python way", I suspect. So, I'm wondering if someone would like to show me some of the tricks I should have used.
4
6601
by: KvS | last post by:
Hi all, I'm pretty new to (wx)Python so plz. don't shoot me if I've missed something obvious ;). I have a panel inside a frame, on which a Button and a StaticText is placed: self.panel = wx.Panel(self,-1) self.button = wx.Button(self.panel,-1,"Klikkerdeklik") self.button.SetPosition((200,40)) self.Bind(wx.EVT_BUTTON, self.VeranderLabel, self.button)
0
1384
by: Vladi | last post by:
Hello everybody, I have a asp.net 1.1 page which has the following controls: 4 Images whose src points to an image.aspx file which returns a different jpg from a DB 1 flash object on top of those which contains buttons with links embedded in them to another pages (each having the same layout, identical to the page I'm talking about). The transfer is realised with some url_get method in the flash. I don't know because I didn't make it and...
3
2548
by: citronelu | last post by:
Hi, I'm new to wxpython, and the following code is my first serious attempt: #~ start code import wx class MyPanel(wx.Panel):
3
2315
by: Soren | last post by:
Hi, Id like to make my own special listbox.. I want to able (at the push of a button) to add another item to my special listbox... each item is a panel with a label, some buttons and maybe a text control. I've tried adding a new panel object with the stuff i want to the sizer i'm using for my listbox (which is a panel which can contain other panels)... and then run update() and refresh() on everything... But it doesn't work.. i see a...
3
1503
by: wongjoekmeu | last post by:
Dear All, I want to write a GUI program with wxPython displaying an image. But the image I have is monochromatic. When I retrieve the data from the image I end up with a list of integer. Starting from a list of integer and knowing the width and height of the image, how do I display such an image on a wx panel or frame ? I have had a look at the wxPython demo but there I see only images where the data is a list of tuple consisting of r,g...
0
9672
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...
0
10437
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10214
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10164
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
10001
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
9042
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
4113
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
2
3723
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
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.