Board index » cppbuilder » Customdraw, a few questions
Newbie
![]() CBuilder Developer |
Customdraw, a few questions2006-10-25 03:47:20 AM cppbuilder28 When customdrawing on a control, is it possible that someone can explain a few things to me please. Since I am trying to do different things with a listview, I will ask questions pertaining to a listview. Lets say that I want to draw some items on a Listview grid, with the code that Gambit posted for me with the progressbar, it looks really simple and makes you want to experiment more. But I want to ask these just in case I am not understanding something. When you use the following code to get the rectangle of the listitem: TRect ItemRect = Item->DisplayRect(drBounds); If I want to place an icon before the text, do I just leave a certain amount of spaces for the icon then write the text? I ask this because I have seen some code that uses a lot of calculations to know where to put the text for the entire row. When looking at code like that I never understand it at all, but looking at the code that I have makes it seem so simple to understand. From what I read in the help file, this code just gets the rectangle of the current item: TRect ItemRect = Item->DisplayRect(drBounds); I guess I am not asking what I am trying to ask very clearly, maybe I better experiment first, then ask the question when I get stuck. |