Board index » cppbuilder » TImage and border

TImage and border


2003-10-14 03:35:48 PM
cppbuilder85
Hi,
I'm trying to find a way to make a button based on an Image shape. This
image doesn't need to be rectangle.
I would like to perform the same thing that CreateRegion allows me to do on
TWinControl, but on a TImage component.
Do you know a such function which could allow me to customize the shape of
my image border ?
If yes, how dynamically (under conception) update my shaped image on my form
?
thanks a lot.
Alain
 
 

Re:TImage and border

"Alain R." < XXXX@XXXXX.COM >wrote in message
Quote
I would like to perform the same thing that CreateRegion
allows me to do on TWinControl, but on a TImage component.
TImage is a TGraphicControl descendant. Regions require a HWND, which
TGraphicControl does not have. TImage always displays rectangle images,
even if they have transparent areas, the TImage itself is always
rectangular. You would probably be better off writing your own component
based on TCustomControl instead, where you draw the desired image by
overriding its inherited Paint() method, and then you'll have an HWND to use
with regions as well.
Gambit