IonicWind Software

IWBasic => IWGrid => IWGrid Development => Topic started by: LarryMc on January 15, 2014, 07:05:02 AM

Title: Update 01-15-2014
Post by: LarryMc on January 15, 2014, 07:05:02 AM
Attached is updated alpha release of the IWGrid library (v0.09).
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:
Added error message if attempt is made to use IWG_SetDat with @IWGIMAGE type cell
Added ability to load @IWGIMAGE cells from a resource file.
_____________________________________________

Loading @IWGIMAGE cells from a resource file
First of all your application will have to be built as a project and not a single file executable,.  That's because you can only add resources to projects in IWBasic.

Right now typical image setup command is:
IWG_InitCellDat(main,  501, 6, 3, getstartpath+"back.jpg",@IWGIMAGE,0)
IWG_InitCellDat(main,  501, 8, 4, getstartpath+"bug1.bmp",@IWGIMAGE,@IWG_NOSCALE)

the same images loaded from a resource file would look like this
IWG_InitCellDat(main,  501, 6, 3, "#234",@IWGIMAGE,0)
IWG_InitCellDat(main,  501, 8, 4, "#2222",@IWGIMAGE,@IWG_NOSCALE)

The corresponding entries in the resource file look like this:
2222 RTIMAGE "c:\!iwgrid\bug1.bmp"
234   RTIMAGE "c:\!iwgrid\back.jpg"


The entries in the rc file must have numeric IDs like the 234 and 2222 and they must be unique
The type in the rc file must be  RTIMAGE
And the image must be a scalable bmp,jpg, or gif.

When adding the resource from inside the IDE select "Scalable Image" as the resource type and make sure the ID is changed to a unique number value.

When initializing the cell with the IWG_InitCellDat use the resource ID number preceded by # all in quotes. i.e  "#2222"
_____________________________________________

This release does not contain a demo program.

edited
<download removed>