>>procedure TRadButton.CreateParams(var Params: TCreateParams);
>>begin
>> inherited CreateParams(Params);
>> CreateSubClass(Params, 'BUTTON');
>> Params.Style := Params.Style or BS_RADIOBUTTON or BS_TEXT;
>> Params.ExStyle:=Params.ExStyle or WS_EX_TRANSPARENT;
>>end;
Hi Paul,
I've done exactly that on my previous attempts but it didn't work.
Anyway, yesterday just as I've finished implementing the control with
DrawFramedControl API, I've came across the code below and it seems to
do the trick. However, that only makes the button part of the control
transparent and not the label (but that is minor setback). Anyway, I
now have two different implementation of a transparent radiobutton; more
than what I've bargain for :)
Brush.Style:= bsClear;
HandleNeeded;
SetWindowlong(Handle, GWL_EXSTYLE, WS_EX_TRANSPARENT);
Cheers
Al.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Paul McKenzie
Sent: Monday, 21 June 2004 12:19 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Transparent Radiobutton
Have you had a look at TControl.ControlStyle and csOpaque
TSpeedButton uses this for its transparency...
TSpeedButton is from TGraphicControl (not TWinControl)
Regards
Paul McKenzie
SMSS Ltd.
New Zealand.
----- Original Message -----
From: "Paul McKenzie" <[EMAIL PROTECTED]>
To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]>
Sent: Monday, June 21, 2004 11:33 AM
Subject: Re: [DUG] Transparent Radiobutton
> I don't think I quite understand what you are after...
> What part of the button do you want transparent and what part do you
want
> not transparent ?
>
>
> Regards
> Paul McKenzie
> SMSS Ltd.
> New Zealand.
> ----- Original Message -----
> From: "Allan Vergara" <[EMAIL PROTECTED]>
> To: "NZ Borland Developers Group - Delphi List" <[EMAIL PROTECTED]>
> Sent: Monday, June 21, 2004 11:17 AM
> Subject: RE: [DUG] Transparent Radiobutton
>
>
> > Hi Paul,
> > I will still have the same problem; the label will be transparent
but
> > not the button.
> >
> > Thanks.
> > Al.
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
> > On Behalf Of Paul McKenzie
> > Sent: Monday, 21 June 2004 11:06 a.m.
> > To: NZ Borland Developers Group - Delphi List
> > Subject: Re: [DUG] Transparent Radiobutton
> >
> > Is only a radio button ???
> > If so why not have a separate label and RadioButton without label
text.
> >
> > Regards
> > Paul McKenzie
> > SMSS Ltd.
> > New Zealand.
> > ----- Original Message -----
> > From: "Allan Vergara" <[EMAIL PROTECTED]>
> > To: "NZ Borland Developers Group- Delphi List"
<[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Monday, June 21, 2004 10:43 AM
> > Subject: [DUG] Transparent Radiobutton
> >
> >
> > > Good morning everyone!
> > >
> > > Does anyone know how to make a radiobutton partially transparent
(ie.
> > > button and text still visible ;p). I've made some progress by
painting
> > > the radiobutton to a temporary bitmap and combining this to the
> > parent's
> > > image (only the area under the control), using BrushCopy to
achieve
> > > transparency. This works fine except when I click on the control
and
> > > drag the mouse outside its boundrect, Windows seems to be
repainting
> > the
> > > button part of the control without sending a WM_PAINT. I've tried
> > Google
> > > but it seems that the only solution out there is to make the
control
> > > ownerdraw. Unfortunately we are still supporting Win95 - XP; hence
I
> > > can't make the assumption that the appearance of the radiobutton
will
> > > remain the same. Furthermore, because we are supporting Win95 I
can't
> > > use the fancy transparency features that are available in win2000
:(
> > >
> > > Ideas???
> > >
> > >
> > > _______________________
> > > Allan D. Vergara
> > > Software Engineer
> > > Niche Software Ltd.
> > > http://www.WorkPace.com
> > >
> > > _______________________________________________
> > > Delphi mailing list
> > > [EMAIL PROTECTED]
> > > http://ns3.123.co.nz/mailman/listinfo/delphi
> > >
> >
> >
> > _______________________________________________
> > Delphi mailing list
> > [EMAIL PROTECTED]
> > http://ns3.123.co.nz/mailman/listinfo/delphi
> >
> > _______________________________________________
> > Delphi mailing list
> > [EMAIL PROTECTED]
> > http://ns3.123.co.nz/mailman/listinfo/delphi
>
>
> _______________________________________________
> Delphi mailing list
> [EMAIL PROTECTED]
> http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi