Hi Faraj, Your problem is due to the fact that Laszlo is using lazy replication for the opttree. So, the views are getting reused when you scroll, and you only ever have n+1 views (where n is the number that will fit in the visible area). Thus, when you scroll down, the view that you set the background color for gets reused. This is why another view now has that selection color.
In order to fix this problem, you would need to either (1) store the fact that it's selected in an attribute of the data node that is being replicated or (2) add an applyData() method to your view, which checks if the node is selected and sets its background color accordingly. I only include (1) for completeness; (2) is definitely the better way to go. And, I strongly suggest reading the Laszlo documentation on lazy replication - It is extremely useful, but it can also be tricky at times and can cause some odd problems to crop up. - Jes -----Original Message----- Date: Tue, 22 Aug 2006 10:18:32 +0200 From: Noura Faraj - EBM WebSourcing <[EMAIL PROTECTED]> Subject: [Laszlo-user] Opttree problem To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi, I have created my own opttree and when a node is selected its font color change. I have a vertical scrollbar for the tree, when I scroll down until the selected node is hidden and then I scroll back up another node has the selection font color. The right node is still selected but the color isn't right. I have tried to change the background color but I have the same problem. Does somebody know how to solve this problem? Faraj Noura ------------------------------ _______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user End of Laszlo-user Digest, Vol 22, Issue 16 ******************************************* _______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
