How can I use my own custom buttons (images) to replace the default [-]
/[+]
buttons in the VST?
I want to use arrows instead (, ), but also to support RTL bidi mode (, ).
edit: I am aware of the bsTriangle
style (ButtonStyle). It does not respect RTL. I want to use my own custom images.
Aren't those images usually in Windows Vista and Windows 7? The tree control should get them automatically on those systems when you have themes enabled.
The easy way to get something close to that is to just set the ButtonStyle
property to bsTriangle
. It won't be exactly the images shown in the question, though. The "minus" arrow will point straight down instead of diagonally, and the "plus" arrow will be solid instead of an outline.
You can provide your own bitmap. Change the VT_XPBUTTONMINUS and VT_XPBUTTONPLUS resources to whatever images you want, and set the ButtonFillMode
property to fmShaded
.
I see no facility for changing the image based on the bi-di mode, though. You can create a descendant class that overrides PaintNodeButton
, and then paint whatever you want. Copy the placement code from the parent class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With