[Lazarus] csOpaque seems to be broken in 0.9.29

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Dec 22 15:31:56 CET 2009


Paul Ishenin wrote:
>>   
> csOpaque is a hint which component gives to lcl whether it fully draws 
> itself or not. It does not mean that component should be drawn 
> transparently.


To be fair, I did try and find help on csOpaque, but there was none. I then
searched the LCL and found the following code with comment. I assumed from
that, that csOpaque means the component will be transparent.

----------------------------------
constructor TCustomPanel.Create(TheOwner : TComponent);
begin
  inherited Create (TheOwner);
  FCompStyle:= csPanel;
  ControlStyle := ControlStyle + [csAcceptsControls, csCaptureMouse,
    csClickEvents, csSetCaption, csDoubleClicks, csReplicatable,
    csNoFocus]
    - [csOpaque]; // we need the default background
...
----------------------------------


> Moreover it can't work for TWinControl which has a window 
> - HWND or GdkWindow since that windows are not transparent.

So how else would you create a transparent container component in LCL?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list