I am trying to customize a TStringGrid
by adding visual objects to cells within the grid. One column needs to contain standard windows push buttons in each row and another column needs to contain a drop down with pre-defined options.
From what I have read the best way to achieve this is to draw the buttons manually in the OnDrawCell
event handler. All of the examples I have found use DrawFrameControl()
which does not draw a themed button like you would expect in Windows 7 or later.
Is there an equivalent function to DrawFrameControl()
that will allow me to draw a themed button and if so can someone please give an example of how I might use it?
I also tried creating a vector of TButtons
and setting the parent of each button to be the StringGrid and placing each button within the relevant cell. This also works but does now allow for scrolling of the grid when there are more cells that can be displayed visible area.
I am using RAD Studio 10.2 C++ builder and using the BCC32C compiler (clang-enhanced). It is a VCL WIN32 application.
Aucun commentaire:
Enregistrer un commentaire