April 15, 2024, 11:51:21 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Update 12-09-2013

Started by LarryMc, December 09, 2013, 12:07:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

Attached is updated alpha release of the IWGrid library (v0.07).
Place the IWGrid.lib file in your IWBDev/libs folder.
Place the IWGrid.inc file in your IWBDev/includes folder
$include "IWGrid.inc" needs to be placed at the beginning of any file that uses the lib.

In this release:

Corrected several errors in how different colors are applied to cells.
Added the following commands:
•IWG_SetCellImgMissingColor
•IWG_GetCellImgMissingBGColor
•IWG_GetCellImgMissingBGColor

This release does not contain a demo program. 

From the updated help file section Cell Colors:

To obtain the maximum benefit from individual cell coloring, the User must have a good understanding of:
the various commands used to define colors that may affect a cell's color;
the conditions under which various colors are applied to a cell;
the commands that control grid/cell options that can change those conditions;
and the order of precedence that colors are applied to a cell.

Color commands that may affect a cell's color

IWG_SetGridColor (when used with the following type flags)
  @IWGPROTECTCOLOR - The background color of protected cells. [default = RGB(255,255,255)]
  @IWGUNPROTECTCOLOR - The background color of un-protected cells. [default =RGB(255,255,255)]
  @IWGHILIGHTCOLOR - The background color of highlighted cells. [default = RGB(0,0,128)]
  @IWGHILIGHTTEXTCOLOR - The text color of highlighted cells [default =RGB(255,255,255)]

IWG_SetCellColor
Used to set an individual cell's foreground(text) and background colors.
The default foreground and background color is RGB(0,0,0) (This will be explained later)

IWG_SetCellImgMissingColor
Used to set an individual @IWGIMAGE type cell's foreground(text) and background colors when the image is missing.
The default foreground and background color is RGB(0,0,0) (This will be explained later)

Non-color commands that control options which may affect a cell's color

IWG_SetCellProt
Used to switch a cell between being protected and unprotected. At the same time it is used to switch between @IWGPROTECTCOLOR and @IWGUNPROTECTCOLOR for the cells background.

IWG_SetHiLightRow
Used to set an internal flag that causes the @IWGHILIGHTCOLOR and @IWGHILIGHTTEXTCOLOR to be applied to all cells in a row when any cell in the row has been selected as the current cell.

Order of precedence of cell color application

1. If the IWG_SetHiLightRow command has been used to turn that feature on
    a. All cells in the row that contains the currently selected cell will be colored as follows:
        1) If the grid has focus, the cells text color will be @IWGHILIGHTTEXTCOLOR and the background color will be @IWGHILIGHTTEXTCOLOR.
        2) If the grid does not have focus, the cells text color will be RGB(0,0,0) and the background color will be RGB(200,200,200).
    b. All other cells will follow the rules in paragraph 2 below.

2. If the IWG_SetHiLightRow command has been used to turn that feature off (or it was never turned on)
    a. If the cell type is @IWGIMAGE and  the image is present
        1) Follow the rules in paragraph 2c.
    b. If the cell type is @IWGIMAGE and  the image is missing
        1) If the colors set by IWG_SetCellImgMissingColor are not black on black (default) then those colors will be used; otherwise the rules in paragraph 2c will be followed.
    c. If the colors set by IWG_SetCellColor are not black on black (default) then those colors will be used; otherwise the rules in paragraph 2d will be followed.
    d. The text will be black.
        1) If the cell is "protected" via IWG_SetCellProt the background will be @IWGPROTECTCOLOR; otherwise the background will be @IWGUNPROTECTCOLOR

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library