Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Nov 17, 2019 7:54 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Flicker when moving container controls and cavases
PostPosted: Thu Nov 18, 2010 4:24 pm 
Offline
User avatar

Joined: Sun Jul 08, 2007 8:46 am
Posts: 132
I know the topic of flickering under Windows has been beat to death here and on the feedback system, but I haven't seen anything recently and am looking for any tips to ameliorate the problem.

I have a window with container controls inside group boxes, and also a canvas in a group box, and also a canvas all by itself. I am scrolling the window using the move-the-controls-around method, as I haven't had much luck with the put-everything-on-a-canvas-and-use-canvas.scroll method in the past. All of the controls flicker like crazy when I scroll the window. On Mac of course scrolling is perfect.

I've tried various combinations of double-buffering and erase background, and have also tried with and without GDI+ but nothing seems to help.

Any tips? Does the canvas scrolling method produce less flicker?

Thanks,
Julia

_________________
Mac OS 10.6, RS Pro 2012

"Integrity is doing what's right when no one is looking" - J. C. Watts Jr.


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Thu Jan 06, 2011 12:59 am 
Offline

Joined: Wed Apr 22, 2009 3:44 pm
Posts: 3
There is nothing that seems to work while the window is being moved or resized. It has to do with the way that Windows itself draws the windows. (That sounded funny) It's just something we have to live with. Double buffering defiantly helps on canvas' while the window is stationary though, so it is defiantly recommended. I would even go as far as placing a #if TargetWin32 around the double buffer code if your program is going to be cross platform (OSX draws windows beautifully).


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Thu Jan 06, 2011 11:19 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I've had better luck using my own buffered canvas control rather than the built-in canvas with buffer. It's available in the ARBP source code repository.

I've also noticed that flickering is MUCH better in Studio 2010 R4 and above. YMMV.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Mon Jan 17, 2011 10:55 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Just realized that the buffered canvas class wasn't in the repository. It has now been added. Sorry for the confusion.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Mon Jan 17, 2011 11:06 am 
Offline
User avatar

Joined: Sun Jul 08, 2007 8:46 am
Posts: 132
I only have one little canvas in my window and if it flickered it wouldn't be all that bad. My real problem is all the container controls (each in a groupbox), of which my window is full. I notice on careful inspection that some flicker more than others as the scrollbar is moved. One of them doesn't flicker at all. A few flicker just a bit. Most flicker like mad.

_________________
Mac OS 10.6, RS Pro 2012

"Integrity is doing what's right when no one is looking" - J. C. Watts Jr.


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Mon Jan 17, 2011 11:29 am 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
I've noticed that it's better in 2010 R4 and better but it could be that my applications just aren't doing the same thing as what yours are.

You may want to look at the Windows Functionality Suite as I know there are a few Windows API calls in it to freeze drawing on the window. Haven't really played with it much so I make no guarantees.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Flicker when moving container controls and cavases
PostPosted: Thu Feb 03, 2011 5:44 pm 
Offline
User avatar

Joined: Mon Apr 02, 2007 2:08 am
Posts: 1225
Location: San Francisco, CA, USA
The Windows API calls that freeze window updating are intended for when you are making lots of small updates to a window (for example populating a ListBox with a lot of rows) and don't want the window to repaint itself on every AddRow() call. In short, it's there to improve performance (and it does!) not lock the current appearance.

_________________
Boredom Software


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group