Hi, I have a form containing 2 TreeViews. When I click on a button, items
are transfered from the left tree to the right tree, which causes
flickering. In order to remove such flickering, I surrounded code with
BeginUpdate/EndUpdate for both trees. The left tree doesn't flicker anymore,
but the right one still does!! Even if I call BeginUpdate/EndUpdate on the
right tree only, it still flickers. What's going on here? Is BeginUpdate
working only for the first TreeView of a form or what?
Thanks for your help!
Etienne 6 2064
how many times do you call begin/end update for the second tree?
"Etienne" <oh> wrote in message news:lP********************@b2b2c.ca... Hi, I have a form containing 2 TreeViews. When I click on a button, items are transfered from the left tree to the right tree, which causes flickering. In order to remove such flickering, I surrounded code with BeginUpdate/EndUpdate for both trees. The left tree doesn't flicker anymore, but the right one still does!! Even if I call BeginUpdate/EndUpdate on the right tree only, it still flickers. What's going on here? Is BeginUpdate working only for the first TreeView of a form or what?
Thanks for your help! Etienne
Only once, in the Button.Click event. BeginUpdate is the first line and
EndUpdate the last line..BeginUpdate isn't ever called before. Also, I
disabled XP Theme just to be sure this isn't the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message
news:41***********************@news.xs4all.nl... how many times do you call begin/end update for the second tree?
"Etienne" <oh> wrote in message news:lP********************@b2b2c.ca... Hi, I have a form containing 2 TreeViews. When I click on a button, items are transfered from the left tree to the right tree, which causes flickering. In order to remove such flickering, I surrounded code with BeginUpdate/EndUpdate for both trees. The left tree doesn't flicker anymore, but the right one still does!! Even if I call BeginUpdate/EndUpdate on the right tree only, it still flickers. What's going on here? Is BeginUpdate working only for the first TreeView of a form or what?
Thanks for your help! Etienne
what does the transfer proces look like? are you taking a node out of the
left tree and then put that node into the right tree and then loop? or are
you copying a node from the left tree, putting it into the right tree, then
loop and finally removing all nodes from the left tree? is there a
difference between the two methods with respect to flicker?
"Etienne" <oh> wrote in message news:4N********************@b2b2c.ca... Only once, in the Button.Click event. BeginUpdate is the first line and EndUpdate the last line..BeginUpdate isn't ever called before. Also, I disabled XP Theme just to be sure this isn't the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:41***********************@news.xs4all.nl... how many times do you call begin/end update for the second tree?
"Etienne" <oh> wrote in message news:lP********************@b2b2c.ca... Hi, I have a form containing 2 TreeViews. When I click on a button, items are transfered from the left tree to the right tree, which causes flickering. In order to remove such flickering, I surrounded code with BeginUpdate/EndUpdate for both trees. The left tree doesn't flicker anymore, but the right one still does!! Even if I call BeginUpdate/EndUpdate on the right tree only, it still flickers. What's going on here? Is BeginUpdate working only for the first TreeView of a form or what?
Thanks for your help! Etienne
I found where the problem is. Whenever I edit the text of an existing node,
it causes the tree to redraw even if BeginUpdate was called. Here's a sample
code to reproduce the problem :
destTree.BeginUpdate();
TreeNode n = null, p = null;
for (int i=0; i<50; i++) {
p = n;
n = destTree.Nodes.Add("test");
if (p != null) // If you comment those 2 lines, it no longer redraws.
p.Text = "*" + p.Text;
}
destTree.EndUpdate();
This causes the treeview to redraw for every item. Any idea for a
work-around? I tried subclassing and blocking WM_PAINT (0xF) after
BeginUpdate is called, but this doesn't solve the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message
news:42***********************@news.xs4all.nl... what does the transfer proces look like? are you taking a node out of the left tree and then put that node into the right tree and then loop? or are you copying a node from the left tree, putting it into the right tree, then loop and finally removing all nodes from the left tree? is there a difference between the two methods with respect to flicker?
"Etienne" <oh> wrote in message news:4N********************@b2b2c.ca... Only once, in the Button.Click event. BeginUpdate is the first line and EndUpdate the last line..BeginUpdate isn't ever called before. Also, I disabled XP Theme just to be sure this isn't the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:41***********************@news.xs4all.nl... how many times do you call begin/end update for the second tree?
"Etienne" <oh> wrote in message news:lP********************@b2b2c.ca... Hi, I have a form containing 2 TreeViews. When I click on a button, items are transfered from the left tree to the right tree, which causes flickering. In order to remove such flickering, I surrounded code with BeginUpdate/EndUpdate for both trees. The left tree doesn't flicker anymore, but the right one still does!! Even if I call BeginUpdate/EndUpdate on the right tree only, it still flickers. What's going on here? Is BeginUpdate working only for the first TreeView of a form or what?
Thanks for your help! Etienne
the edit is a new feature, anyway, have a look http://www.codeproject.com/cs/miscctrl/listviewff.asp
"Etienne" <oh> wrote in message news:v8********************@b2b2c.ca... I found where the problem is. Whenever I edit the text of an existing node, it causes the tree to redraw even if BeginUpdate was called. Here's a sample code to reproduce the problem :
destTree.BeginUpdate(); TreeNode n = null, p = null; for (int i=0; i<50; i++) { p = n; n = destTree.Nodes.Add("test"); if (p != null) // If you comment those 2 lines, it no longer redraws. p.Text = "*" + p.Text; } destTree.EndUpdate();
This causes the treeview to redraw for every item. Any idea for a work-around? I tried subclassing and blocking WM_PAINT (0xF) after BeginUpdate is called, but this doesn't solve the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:42***********************@news.xs4all.nl... what does the transfer proces look like? are you taking a node out of the left tree and then put that node into the right tree and then loop? or are you copying a node from the left tree, putting it into the right tree, then loop and finally removing all nodes from the left tree? is there a difference between the two methods with respect to flicker?
"Etienne" <oh> wrote in message news:4N********************@b2b2c.ca... Only once, in the Button.Click event. BeginUpdate is the first line and EndUpdate the last line..BeginUpdate isn't ever called before. Also, I disabled XP Theme just to be sure this isn't the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:41***********************@news.xs4all.nl... how many times do you call begin/end update for the second tree?
"Etienne" <oh> wrote in message news:lP********************@b2b2c.ca... > Hi, I have a form containing 2 TreeViews. When I click on a button, > items are transfered from the left tree to the right tree, which > causes flickering. In order to remove such flickering, I surrounded > code with BeginUpdate/EndUpdate for both trees. The left tree doesn't > flicker anymore, but the right one still does!! Even if I call > BeginUpdate/EndUpdate on the right tree only, it still flickers. > What's going on here? Is BeginUpdate working only for the first > TreeView of a form or what? > > Thanks for your help! > Etienne
This article doesn't solve my problem, but I tried blocking both WM_PAINT
and WM_ERASEBKGND. There is not much flickering anymore! The scrollbars
still flicker, but at least not the content. Is there a way to stop
redrawing of scrollbars?
Etienne
"Joep" <St***@DeStoep.nl> wrote in message
news:42***********************@news.xs4all.nl... the edit is a new feature, anyway, have a look
http://www.codeproject.com/cs/miscctrl/listviewff.asp
"Etienne" <oh> wrote in message news:v8********************@b2b2c.ca...I found where the problem is. Whenever I edit the text of an existing node, it causes the tree to redraw even if BeginUpdate was called. Here's a sample code to reproduce the problem :
destTree.BeginUpdate(); TreeNode n = null, p = null; for (int i=0; i<50; i++) { p = n; n = destTree.Nodes.Add("test"); if (p != null) // If you comment those 2 lines, it no longer redraws. p.Text = "*" + p.Text; } destTree.EndUpdate();
This causes the treeview to redraw for every item. Any idea for a work-around? I tried subclassing and blocking WM_PAINT (0xF) after BeginUpdate is called, but this doesn't solve the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:42***********************@news.xs4all.nl... what does the transfer proces look like? are you taking a node out of the left tree and then put that node into the right tree and then loop? or are you copying a node from the left tree, putting it into the right tree, then loop and finally removing all nodes from the left tree? is there a difference between the two methods with respect to flicker?
"Etienne" <oh> wrote in message news:4N********************@b2b2c.ca... Only once, in the Button.Click event. BeginUpdate is the first line and EndUpdate the last line..BeginUpdate isn't ever called before. Also, I disabled XP Theme just to be sure this isn't the problem.
Etienne
"Joep" <St***@DeStoep.nl> wrote in message news:41***********************@news.xs4all.nl... > how many times do you call begin/end update for the second tree? > > "Etienne" <oh> wrote in message > news:lP********************@b2b2c.ca... >> Hi, I have a form containing 2 TreeViews. When I click on a button, >> items are transfered from the left tree to the right tree, which >> causes flickering. In order to remove such flickering, I surrounded >> code with BeginUpdate/EndUpdate for both trees. The left tree doesn't >> flicker anymore, but the right one still does!! Even if I call >> BeginUpdate/EndUpdate on the right tree only, it still flickers. >> What's going on here? Is BeginUpdate working only for the first >> TreeView of a form or what? >> >> Thanks for your help! >> Etienne
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: SJ via .NET 247 |
last post by:
For some reason, the scrollbars in my treeview component are not working. The scrollable property is set to True.
I have the treeview in a panel. Does that make any difference?
...
|
by: shumaker |
last post by:
A few form controls have a Beginupdate function that stops the control
from being painted until endupdate is called, and I'm wondering if
anyone has an idea of how to implement a function like this...
|
by: Etienne |
last post by:
Hi, I have a form containing 2 TreeViews. When I click on a button, items
are transfered from the left tree to the right tree, which causes
flickering. In order to remove such flickering, I...
|
by: Rog |
last post by:
Hello,
Yesterday I downloaded IEwebcontrols.exe and
TreeviewControl.msi
from
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/dnaspp/html/aspnet-...
|
by: DraguVaso |
last post by:
Hi,
I found on the net that it is possible to use the BeginUpdate end
EndUpdate-methods with a DataGrid:...
|
by: ada |
last post by:
Hi,
I had this problem and couldn't find a solution. An ASP .NET treeview
ieWebcontrol worked fine in my ASP .NET 1.1 application, but stopped
working when installed in a Windows Server 2003...
|
by: Daves |
last post by:
is there any documentation out there to find out if and then how I can work
with TreeView on client side through jscript? For example I want to change
title of nodes and remove without doing...
|
by: Daves |
last post by:
Sorry folks but I will be reposting this question from 6/5 until someone
gives me an answer - the question is very easy and so ought the answer to
be. I really need the answer!
-------
I'm...
|
by: Anil Gupte |
last post by:
I am using the following code:
URLListBox.BeginUpdate()
URLListBox.DataSource = DSContent '.Tables("ContentSites")
URLListBox.DisplayMember = "ContentSites.SiteName"
URLListBox.ValueMember =...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |