Professional UI Solutions
Site Map   /  Register


Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Grid cell having icon and text Collapse All
Subject Author Date
Bart Kampers Jul 22, 2009 - 6:42 AM



Is it possible to have a grid cell with an icon and text. I tried the code below but this only shows the icon...


  CExtGridCellPicture* cell = (CExtGridCellPicture*) GridCellGet(col, row, 0, 0, RUNTIME_CLASS(CExtGridCellPicture));

  if (cell != NULL)






    SetBackground(cell, row);




Technical Support Jul 22, 2009 - 12:46 PM

The CExtGridCellPicuture*** grid cell classes display an image only. They are designed to display a picture inside the entire cell area. You should use the CExtGridCellString simple text grid cell. The CExtGridCell::TextSet() method assigns a cell text. The CExtGridCell::IconIndexSet() method assigns an icon index. The icon should be preliminary registered in the grid control using the CExtGridWnd::GridIconInsert() method which returns a registered icon index.