Re: Phil Russel - EuGrid

new topic     » topic index » view thread      » older message » newer message

Phil Russell wrote:

> Craig Welch wrote:

>> I would prefer to hand a handle to EuGrid, to save all of that file I/O.
>> But if I use:
>> void = EGW_SetCellProperty (..,.., EGW_CELL_TEXT, pixmap) it fails with
>> Win32Lib AppWindow message 'unable to open ", in ReadDIB'.
>>
>> ----------
>> So problem 1 is: how to pass Eugrid a handle to a bitmap?
>> ----------
> 
> There are two parts to this:
> 
> 1. First is my fault - there is a bug in EGW_SetCellProperty() whereby it
> converts
> atom values to sequences for the EGW_CELL_TEXT property, rendering any handle
> that
> you send to the function invalid.  
> 
> You need to edit the following lines in EuGrid.ew->EGW_SetCellProperty(),

<snip>

That fix was fine, it now handles handles fine. Thanks.

> 2. To display the contents of a Pixmap, you need to use 'getHandle(Pixmap)'
> instead of just 'Pixmap' as this function returns the handle of the bitmap in
> the pixmap.

Actually I was doing that, but failed to make that clear when I typed my 
'pseudocode'.

>> -----------
>> Problem 2 is: Why would the presence of a picture cell cause other cells 
>> in the row to continually want to re-draw themselves?
>> -----------
>>
> I'm not sure - I'd have to see your code.  One thing to try would be to define
> your Kanji column as EGW_PICTURE when you create it rather than setting the
> cell type via the EGW_CELLFORMAT message (see example below)  From your
> screenshot
> it looks like this column will always contain bitmaps, so no need to specify
> this dynamically.

Ah, I've constructed my code in the Win32Lib IDE, adding the columns as 
fields. I therefore don't have any access to the EGW_AddColumn statement.

My first thought was to set the column properties by way of
x = EGW_SetColumnProperty(Grid1, GridKanji, EGW_COL_TYPE, EGW_PICTURE)
but as it's not documented I ended up with the EGW_CELLFORMAT statement.
I've now gone to EGW_SetColumnProperty and it's fine.

Thanks again,

-- 
Craig

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu