Re: Phil Russel - EuGrid
- Posted by Phil Russell <pg_russell at lineone.net> Sep 16, 2006
- 548 views
Craig Welch wrote: > > The data in the 'Kanji' column are Unicode codes for each > character. This is what I do, in pseudocode: > > procedure Grid1_onEvent > if msg=EGW_CELLFORMAT then > if column = KANJI then > get the Unicode > write character in Japanese font to hidden RichEdit field > print Richedit field to pixmap > void = copyToBitmapFile(pixmap, file_name) > void = EGW_SetCellProperty ( ..,.. EGW_CELL_TYPE, EGW_PICTURE ) > void = EGW_SetCellProperty(..,.., EGW_CELL_TEXT, file_name) > end if > end if > end procedure > Actually I may have an idea why you are getting problem #2. Because the grid is an emulated control it basically has to redraw itself if any events occur within it, including clicks. However, I've coded it so that it caches the bitmap from the last time it repainted itself, and if none of the underlying grid data has changed then it just uses this rather than building a new one from scratch. Is it possible that your code above (which will run every time *anything* happens to the grid) is generating a different file_name for the same row each time? This would mean that the grid data will be constantly changing and this could be enough to give you a flicker. If I'm right, you may need to cache the bitmap handle for a given row for as long as the row is visible. HTH, Phil