softtouch 9 Posted June 16, 2023 I use virtualstringtree in report mode (like a grid). I need to have a column where no text is in the cells, but instead an image. That image need to be centered in the cell. Setting the image index in the onGetImageIndex will display the image, but always left aligned. Does anybody know how to center align that image or is that not possible with the virtualtreeview? Share this post Link to post
Fr0sT.Brutal 900 Posted June 19, 2023 Custom draw is always a method where you can do everything you want (OnDrawCell IIRC) Share this post Link to post
mvisser 0 Posted June 20, 2023 Custom drawing is indeed the way to go. You can use TVirtualStringTree.OnBeforeItemPaint event to do your custom drawing. Share this post Link to post
softtouch 9 Posted June 20, 2023 Alright, so it will be a custom draw solution. I thought it will, but wanted to be sure. Could be that there are some properties I could not find. Share this post Link to post