April 25, 2024, 09:52:23 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Info Only Update - 12-07-2013

Started by LarryMc, December 07, 2013, 10:28:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

While looking at Brian's code I noticed that he had an if statement testing to see if an image was missing and if it was missing he was changing the cell from an image cell to a text cell and changing the fg/bg color of the cell.

My latest release removed the need for the if statement and for changing the cell type from an image to text.
However, while running his program I noticed the background color of the cell when an image was missing wasn't changing.

I found that he had the line hilite feature turned on.  With it on the background could only be one of two values for the entire grid.
If the line hilite feature was off then when a line wasn't selected the background would  follow the color set for each cell.
That was an easy fix.
BUT, since I only allowed one set of colors for each cell I have another problem.
The default background color for all cells in the grid is white.  When I set the cell bg color , that color is used whether the image is there or not and will show if the image does not completely fill the cell.

So, what I'll have to do is create a second set of colors for image cells.
So, one set will be used when the image is present and the 2nd set will be used(if not black on black) for when the image is missing.
I'll make it so if the 2nd set is 0/0 then I'll use the 1st set and if the 1st set is also 0/0 then I'll use the grid default which is black on white.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library