Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TreeCtrl » Blinking tree when opening or closing nodes
Blinking tree when opening or closing nodes [message #23479] Thu, 22 October 2009 11:29 Go to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Hi, I'm using TreeCtrl for displaying and changing some large configuration trees and today I observed that the tree is blinking while opening and closing its nodes. I use Upp1607 now, but I tried to recompile my application also in Upp2008.1 and Upp1197. I discovered that this problem appeared between versions 2008.1 and 1197 and that the relevant change was that some of the lines were put out of method TreeCtrl::SyncTree (in TreeCtrl.cpp) to method TreeCtrl::SyncAfterSync. When I put the lines back in version 1607, the problem disappeared.
Relevant line are:

if(cursorid >= 0)
SetCursor(cursorid, false, false, false);
// PostCallback(PTEBACK1(SyncAfterSync, restorefocus));
if(treesize != sb.GetTotal()) {
sb.SetTotal(treesize);
Refresh();
}
SyncCtrls(true, restorefocus);
SyncInfo();

Is there anybody, who do remember what was this change good for? I'm not using drag & drop and most advanced features of TreeCtrl, so I can't test, whether my changes to TreeCtrl.cpp harm something or not. So I am asking: Is it safe to compile my applications with this little change or not?

Thank you for your interest and have a nice day Smile

Gabi
Re: Blinking tree when opening or closing nodes [message #23516 is a reply to message #23479] Mon, 26 October 2009 08:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Have you tried to activate backpaint?

As for the fix, it is quite old now, it is afaik supposed to solve some focus setting problems...

Mirek
Re: Blinking tree when opening or closing nodes [message #23520 is a reply to message #23516] Mon, 26 October 2009 13:49 Go to previous messageGo to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Activating BackPaint on the tree and/or its items doesn't work. The same problem I can see on reference/TreeCtrl application. The minimal change after which the blinking disappeared was to remove all content of TreeCtrl:SyncAfterSync except last line (calling SyncInfo) and place it in TreeCtrl::SyncTree before the call to PostCallback.

Gabi
Re: Blinking tree when opening or closing nodes [message #23561 is a reply to message #23520] Sat, 31 October 2009 09:44 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am investigating the issue... Just to be clear: Do you have embedded ctrls in TreeCtrl? (This is the case I clearly see blinking...)
Re: Blinking tree when opening or closing nodes [message #23562 is a reply to message #23561] Sat, 31 October 2009 10:40 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
OK, hopefully issue is now fixed.

Anyway, I would like to ask you for thorough testing of this fix. A lot of strange effects were observed during plumbing; I hope I succeeded in resolving all of them, but..

Mirek
Re: Blinking tree when opening or closing nodes [message #23575 is a reply to message #23562] Mon, 02 November 2009 10:12 Go to previous messageGo to next message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Yes, I use have embedded Ctrls in TreeCtrl. As for testing your fix - am I supposed to try last night build version of Upp or download the changed code from SVN?
I will try to do some tests this week, but next few days I'm working on another project, not using Upp.
Thank you for your interest.

Gabi
Re: Blinking tree when opening or closing nodes [message #23579 is a reply to message #23575] Mon, 02 November 2009 11:16 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
qapko wrote on Mon, 02 November 2009 04:12

Yes, I use have embedded Ctrls in TreeCtrl. As for testing your fix - am I supposed to try last night build version of Upp or download the changed code from SVN?



Yesterday you was supposed to use SVN, today SVN or night build Smile

Mirek
Re: Blinking tree when opening or closing nodes [message #23658 is a reply to message #23579] Wed, 11 November 2009 09:11 Go to previous message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
So I've tested it with Upp1683 and it seems to be OK. The blinking disappeared and the only visual change I can see comparing to Upp2008.1 is that drawing of the tree is now not that fast as it was in Upp2008.1. Thank you for your help.

Gabi
Previous Topic: Nodes with Ctrl content disappear when Drag n Drop
Next Topic: Can't add/remove +/- sign [CanOpen()]
Goto Forum:
  


Current Time: Thu Mar 28 23:32:32 CET 2024

Total time taken to generate the page: 0.01160 seconds