April 27, 2024, 12:43:46 PM

News:

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


Update 01-15-2014

Started by LarryMc, January 15, 2014, 07:05:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LarryMc

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>
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library