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 2019
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: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: linyimin |
last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
|
by: erikbower65 |
last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA:
1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
|
by: kcodez |
last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
|
by: Taofi |
last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same
This are my field names
ID, Budgeted, Actual, Status and Differences
...
|
by: Rina0 |
last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
|
by: DJRhino |
last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer)
If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _
310030356 Or 310030359 Or 310030362 Or...
|
by: Mushico |
last post by:
How to calculate date of retirement from date of birth
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
| |