Link to home
Start Free TrialLog in
Avatar of Borrt
Borrt

asked on

Radio Group Transpartency

Is it possible to make a radio group box transparent? And if so how is it done ??  I have an image on my form and i dont want the box covering the background. Plus   i dont to use single radio buttons!!!  HELP !! URGENT !!!
Avatar of Borrt
Borrt

ASKER

Adjusted points from 100 to 150
//Your RadioButton must do like the RadioGroup Component.

unit MyRadioGroupComp;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls;

type
  TMyRadioGroup = class(TRadioGroup)
  private
    { Private declarations }
  protected
    { Protected declarations }
    procedure CreateParams(var Params: TCreateParams);override;
  public
    { Public declarations }
  published
    { Published declarations }
  end;

procedure Register;

implementation

procedure Register;
begin
  RegisterComponents('Samples', [TMyRadioGroup]);
end;

{ TRadioGroup1 }

procedure TMyRadioGroup.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.ExStyle := Params.ExStyle + WS_EX_TRANSPARENT;
end;

end.
Avatar of Borrt

ASKER

Close but no cigar :)  when entering strings, the standard grey box is visible again!   any other suggestions ???
Hi borrt,

In additional you may to try to use TLabel with Transparent property=true instead caption of radiogroup. And then, as usual, write onClick events for TLabel to switch in RadioGroup.

----
Igor.
ASKER CERTIFIED SOLUTION
Avatar of Eddie Shipman
Eddie Shipman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry,
My e-mail address is
eshipman@e-mds.com
Avatar of Borrt

ASKER

thanks for the email folow up too !!!