` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

ABC: Using derived BufferFieldsClass to change listbox colors
2002-04-03 -- Dennis E. Evans
 
Newsgroups: softvelocity.products.c55ee Hi all. > I am trying to make my code more managable. Here is my situation. I have a > browse which is filled from a Queue. This browse has individual cells > colored based on various parameters. Currently my queue looks like this. As all ready said styles are typically much simpler to deal with than the four color variables. In addition, using a derived BufferFieldsClass makes thing very easy. Derive the class and add a method that allows you to control what is stored in the buffer field. Then in your code add the queue fields and the style numbers to the derived BufferFieldsClass, loop while (ListControl{proplist:exists, ColorCount}) ! assign the style field to the ThreeFieldClasses Self.ColorFlds.AddThreeFields(StyleOne, StyleTwo, what(Self.GbQ,ColorCount + offset)) ColorCount += 1 offset += 1 end That will assign the style field to the buffer and the styleOne/Two to the left and right. To assign the styles you just Self.AssignLeftToBuffer() or AssignRightToBuffer() To change the colors step through the list property and List.Right = new style number or the left side. You can also have individual cell or conditional colors, but that requires a bit more fooling around. If you don't want to deal with the styles use 4 element arrays to hold the color values and assign the array elements to the derived bufferFieldClass. As always this belongs in a derived class. Dennis


Today is December 3, 2024, 11:53 am
This article has been viewed 35408 times.
Google search has resulted in 34 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: