can anybody help me with TVirtualStringTree?

can anybody help me with TVirtualStringTree?
I've never used this component before and few days ago I installed it. I need to create additional columns with checkboxes. As I understand there is the only way to do it - draw them manually in AfterCellPaint event handler (without node editing state).  So I've painted checkboxes and now I need to handle clicks on them.
In Click or ColumnŠ”lick events I can find out what cell was clicked, but how do I know that user clicked inside checkbox? I need cell rect coordinates.. how to get them? Or there is another way?

this sample source : http://pastebin.com/bipekFmC
http://s13.postimage.org/uvolcwjjr/123.png

Comments

  1. "Advanced" demo uses radio buttons and checkboxes on the "General abilities" tab.

    ReplyDelete
  2. Primož Gabrijelčič in "general abilities" demo VST uses radio buttons and checkboxes in main column, it is easy to do using properties. I need checkboxs in 3 additional columns

    ReplyDelete
  3. Andrew Terekhov Ah, sorry, missed the "additional" part. Maybe you should look into the VT code to see how checkboxes are implemented there?

    ReplyDelete
  4. Primož Gabrijelčič thanks for the good adviсe :)
    I found GetDisplayRect() method, which returns rect for specified node and column, seems it solves my problem :)

    ReplyDelete
  5. PS: I wrote article about my first expirience with TVirtualStringTree. it is in Russian, but there are some code sinppets about using checkboxes in VST columns - http://teran.karelia.pro/articles/item_5845.html

    ReplyDelete

Post a Comment