Thanks for the suggestion Eddie, however, 1) aesthetically I do want to paint over the border, and 2) I'm not really looking for that kind of workaround here.
Yaknow, what should have been a simple procedure of painting a rectangle around a button, has turned into a mammoth scope problem: compensating for the form's titlebar size and borders, then not being able to repaint the panel borders. This has cost me now hours and hours of time.
Now I'm moving on to using a transparent panel with a TShape on it as the rectangle but so far can't get it to work.
If this is a bug in TPanel, it should be reported, and if it already has, there should be a proper workaround / fix.
I'm also thinking about simply saving the canvas of the form, then drawing the rectangle and then (later) restoring the canvas of the form instead of repainting it. Do you know how to do this? If so I will open a new question for you :)
Cheers
Main Topics
Browse All Topics





by: EddieShipmanPosted on 2009-05-07 at 15:35:24ID: 24331378
Why not exclude the border from your painting area, then you don't have to worry about having to repaint it.