Click here to Skip to main content
15,125,104 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a user control. I am creating many user control at run time. On that user control there are some picture box. I change color of that picturebox on an event. information of picturebox (whose color I want to change) is stored in arraylist which store some structure object. then when I am changing color of all picturebox. I want they change color together there is some markable delay in changing color. delay in not problem but they are not changing color together. thats the problem.
Posted

1 solution

If you wrap all of the controls in, for instance a panel control of some sort, and render that panel hidden prior to changing the colors you can then un-hide the panel once the all of the colors have changed and it will appear as if all of the controls have changed together. You could even flash a 'Please Wait' of some kind so that users know that something is happening.
   
Comments
himani_jha 5-Aug-10 6:47am
   
thanks for replying.. but I did not understand what exactly u want to say. U want me to set visible=false of that panel? it will hide everything on page. I have that picture box in red color I want to change it to green. when it change to green all change together. Is there any way to freeze screen till code run,then appear change together. I yes then plz provide me code also.
R. Giskard Reventlov 5-Aug-10 6:52am
   
No, just embed any of your controls/images inside the panel. Just as you render the new colors hide the panel. Once the rendering is complete display the panel. It will make it look as if they are getting set at once. And no, I will not provide you with code: that is for you to figure out for yourself: it's not exactly rocket science, anyway and there are other possible solutions that you should attempt to try; again, you need to do some research: Google is your friend.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900