- This topic has 5 replies, 3 voices, and was last updated 14 years, 11 months ago by Support.
-
AuthorPosts
-
December 4, 2009 at 4:56 pm #33443gamemasterParticipant
Hi
Situation:
I had form with one TsPageControl with 3 pages and lot components on it (~30). Page 2 (of that page control) has big image 800×600. TsSkinMenager.AnimEfect.PageChange.Active:=False. Im using 6.44 version.Problem 1:
Each time i change page it update controls. But that update is visual very bad. First it update form, then pagecontrol then one by on components inside… Its very fast ~100 ms but can be see with naked eye. For example: after changing from page 2 to page 3 in TsPanel on page 3 you can see part of image from last page. Fast after its updated and all is ok. But that glitch is problem.Question 1:
So how to do transition betwine pages to be instant. Or how to update whole page and then display it to avoid component by component update?Problem 2:
With AnimEfect.PageChange.Active:=True and AnimEfect.PageChange.Time:=0 can solve Problem 1. No updating component by component. All updated at once and its good but… when change page all OnDrawItem eavents of TListBox as well as TsListBox is trigered 2-3 times. It has no visual effects but effect performance since TlistBox is Owner drawed with images. With AnimEfect.PageChange.Active:=False OnDrawItem is not triggered at page changing.Question 2:
How to make OnDrawItem eavent to ignore that unnecessary calls (if it is unnecessary)?Question 3:
Is there any other way to make instant page changin that update all components at once and then display it without caling OnDrawItem eavent.Example:
TListBox is on page 2. It has 3 visible items to draw with Style:=lbOwnerDrawFixed. TsSkinMenager.AnimEfect.PageChange.Time:=0. Test code was:
Form1.Caption:=Form1.Caption+'*';
placed in OnDrawItem of TListBox.
After changing to page 3 OnDrawItem is not called. Its ok because it shouldn't. Then after changing from page 3 back to page 2 i got:1) AnimEfect.PageChange.Active:=False
Form caption has value '***' because of OnDrawItem.
Controls updated one by one.2) AnimEfect.PageChange.Active:=True
Form caption has value '*********'.
Controls updated all at once.Hope it helped to understend problem.
December 8, 2009 at 3:10 pm #41210SupportKeymasterHello
Solution with Enabled animation must be used, I think, and we must solve a second problem with OnDrawItem event.
I'll try to make a test application soon for this purpose. Maybe you have such application? If yes, then solving a problem will be faster.December 9, 2009 at 3:32 pm #41225gamemasterParticipantQUOTE (Support @ Dec 8 2009, 04:10 PM) <{POST_SNAPBACK}>HelloSolution with Enabled animation must be used, I think, and we must solve a second problem with OnDrawItem event.
I'll try to make a test application soon for this purpose. Maybe you have such application? If yes, then solving a problem will be faster.December 9, 2009 at 4:28 pm #41226SerebyParticipantjust add it here as an attachment and he will get it when he is back on the board
December 9, 2009 at 5:33 pm #41229gamemasterParticipantHere is source
[attachment=3619:ACBug.zip]
Upload source cous need recompilation in 2 cases. Also i explane all problems in project not in aditional file. There are 2 aditional problems not related to this topic.Here exe compiled on first way.
[attachment=3620:Project1.exe]
Here exe compiled on second way.
[attachment=3621:Project2.exe]Must download both exe or source ( and compile source with and without sSkinManager1.AnimEffects.PageChange.Active)
December 15, 2009 at 10:02 am #41286SupportKeymasterThank you! I'll try it soon.
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)- You must be logged in to reply to this topic.