Redraw Frame Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
arwen
Knows some wx things
Knows some wx things
Posts: 37
Joined: Wed Aug 02, 2006 12:20 pm

Redraw Frame

Post by arwen » Mon Sep 18, 2006 8:22 am

How I can force the redraw of a frame window ?

Thanks :-)

Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg » Mon Sep 18, 2006 8:57 am

You can use

http://www.wxwidgets.org/manuals/2.6.3/ ... dowrefresh

wxWindow::Refresh()

for a specific area, use RefreshRect()

wxFrame is eventually derived from wxWindow so you can use all the methods of it.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb

Detrius
Knows some wx things
Knows some wx things
Posts: 42
Joined: Tue Mar 07, 2006 9:00 pm
Location: San Pedro, CA
Contact:

Post by Detrius » Mon Sep 18, 2006 8:21 pm

Refresh() marks the window as dirty. Therefore, the next time the event loop runs, a paint event will get passed and your window will be updated at that point.

If for some reason you need to force an immediate redraw, and waiting for the next pass through the event loop is too long (unlikely, but possible), you would do the following:

Refresh();
Update();

Refresh() marks the window as dirty. Update() redraws the dirty portions immediately. In general, this is not what you want to do, and Refresh() will be enough, but it comes in handy when needed (e.g. there is no event loop running).

arwen
Knows some wx things
Knows some wx things
Posts: 37
Joined: Wed Aug 02, 2006 12:20 pm

RE: Redraw Frame SOLVED

Post by arwen » Tue Sep 19, 2006 9:08 am

:D

Thanks to all I have solve with your help !!

:D

Post Reply