View previous topic :: View next topic |
Author |
Message |
mutouaa
Joined: 07 Nov 2007 Posts: 24
|
Posted: Tue Jul 27, 2010 10:21 am Post subject: tree background painting issue |
|
|
Hello Infralution Group,
Here in a case I put a tree control in a TabControl and the tab page is not active, so at this time tree is not visible.
here I find out that tree is still repainting if tree data source is updated, unless I suspend tree data update. I would love to ask for your help if there is any sulution to prevent tree from repainting if the tree is not shown in screen? thank you in advance! |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Jul 27, 2010 11:04 pm Post subject: |
|
|
Tree painting is done in response to Paint events - which are generally not sent to a control if it is not visible. The tree does do quite a bit of work in response to a data source update prior to calling Invalidate (which generates a Paint event if the control is visible). If you are trying to boost performance by minimizing response to data updates then the best solution is to either unhook the datasource for controls which aren't visible (ie set to null) or else use SuspendDataUpdate. If you use SuspendDataUpdate you should be careful to ensure that you always match calls with ResumeDataUpdate - otherwise you may end up with a non-updating tree. _________________ Infralution Support |
|
Back to top |
|
|
|