Forum > LCL

TShape Questions - Possible Bug?


Alright, few questions regarding TShape.

1. I've got a TShape box set to follow the mouse in a paintbox, to make it clear what block is selected in the box. However, as the position has to be recalculated for every pixel the mouse moves, the box is very flickery. Is it possible to stop the flickering? Edit: See next post

2. Is it possible to make a TShape transparent? Edit: Set Pen mode to pmMask and style to psClear.

Well this is interesting. I found the source of the flicker. However, it doesn't make much sense, and is possibly a bug.

The paintbox that the shape was drawn over had a function tied to OnMouseLeave, which was supposed to hide the shape. For some reason, this function was called every other pixel that the mouse traveled. Unless I don't understand "OnMouseLeave", this shouldn't be the case, should it?

It shopuld indeed not, but are you sure the debugger didn't interfere ?

Just tested it, it does it regardless of if it is started with the debugger or without it.

Edit: Well actually I just realized the snapshot of 0.9.29 with FPC 2.4.3 doesn't have a debugger? Is that right? I'm on Windows by the way.


[0] Message Index

Go to full version