Bitmap for cellnodes

Hi!

Is it possible to assign different bitmaps/glyphs to the cellsnodes of a TAdvStringGrid? Depending on the contents of the nodes (which would be done programmaticaly). My first impression was: no. But maybe I'm wrong.

I played around a bit with icons or bitmaps in the cell of the node and trigger the onclick event of the cell, but I was'nt very satisfied with the result up to now.

Many thanks in advance
Greetings
Alfons

Via

AdvStringGrid.CellNode.ContractGlyph: TBitmap
AdvStringGrid.CellNode.ExpandGlyph: TBitmap

with setting
AdvStringGrid.CellNode.NodeType = cnGlyph
you can do this.

Ok, thank you for your answer.
I knew that. But this draws a unique glyph for all cell nodes of the grid. My purpose however is to have different glyphs for various cell nodes.

Thank you

Unfortunately there is currently no such built-in functionality.

That is what I was afraid of.

Any idea how to create a workarund? I mentioned that I was playing with AddBitmap or AddIcon in the parent cell of node and handled the on clickcell event of the grid. I could do this, but expand and contract didn't work properly then.

Can you elaborate? What means "didn't work properly"?
If you put the classic built-in nodes in a hidden column and from another column with custom bitmaps call grid.ExpandNode / grid.ContractNode, that should work.

Yes exactly, that is right. If I put the bitmap in a different column, I can call Expand or Contract and this works. However if I place the bitmap in the same column as the node and click on the bitmap (or cell) then I am only able to call Expand once, but thereafter Contract of the node has no effect.
Hmm ...

But nevertheless thank you for your answers

The grid's built-in node handling was not thought to have its own node disabled and something else in the same cell act like a node.

Obviously, yes. But I try my best to recreate something like this ...

Thank you