Solved

Component to make existing radio group box and radio button transparent

Posted on 2004-03-29
6
627 Views
Last Modified: 2008-02-01
Hi,

I'm new to dephi. I have search the net for the component but i couldn't install it.
Do you know where I could get a simple component just to change my existing radio button on the form to be transparent? I want the background colour of the text for the radio button and group box to be transparent.

I notice that if you are running windows XP style it automatically do it for you. do you know why?

Thanks
0
Comment
Question by:AgeOfWars
  • 4
  • 2
6 Comments
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10708551
Check out the free LMD Component set (has a TRadioGroup w/ transparent display)

http://www.ceberus.com/lmd/mfs/products/LMD70.php3

TLMDRadioGroup
Improved replacement of TRadioGroup. This component supports a full Bevel object, free positioning of caption (even vertical!) and transparent display. Customizable picture settings available.

Shane
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10708563
Oops Sorry, and....

TLMDGroupBox
Improved replacement of TGroupBox. This component supports a full Bevel object, free positioning of caption (even vertical!) and transparent display (e.g. when placed on TLMDBackPanel)    
 
 
TLMDRadioButton
Improved replacement of TRadioButton. Supports various 3D-font and layout settings. Customizable picture settings for both states. Transparent display possible.  

Shane
0
 

Author Comment

by:AgeOfWars
ID: 10711107
Thanks Shane,

I know that works but I need to convert the normal group box and radio box delphi provide to transparent colour?

Do you know the code or a component to convert that?

Thanks again
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 11

Accepted Solution

by:
shaneholmes earned 50 total points
ID: 10713063
Try this.

First try it with just the CreateParams overriden, then tru overridding the Paint method.

Shane


  TTransGroup = class(TGroupBox)
  protected
    procedure CreateParams(var Params: TCreateParams); override;
    procedure Paint; override;
    end;


procedure TTransGroup.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  if not (csDesigning in ComponentState)
    then Params.ExStyle:=Params.ExStyle or WS_EX_TRANSPARENT;
  end;

procedure TTransGroup.Paint;
var
  XBitMap: TBitMap;
  XOldDC: HDC;
  XRect: TRect;
begin
{This panel will be transparent only in Run Time}
  if (csDesigning in ComponentState)
    then inherited Paint
  else begin
    XRect:=ClientRect;
    XOldDC:=Canvas.Handle;
    XBitMap:=TBitMap.Create;
    try
      XBitMap.Height:=Height; XBitMap.Width:=Width;
      Canvas.Handle:=XBitMap.Canvas.Handle;
      inherited Paint;
      RedrawWindow(Parent.Handle, @XRect, 0,
                   RDW_ERASE or RDW_INVALIDATE or
                   RDW_NOCHILDREN or RDW_UPDATENOW);
    finally
      Canvas.Handle:=XOldDC;
      Canvas.BrushCopy(XRect, XBitMap, XRect, Color);
      XBitMap.Free;
      end;
    end;
  end;
0
 

Author Comment

by:AgeOfWars
ID: 10729471
Thanks Shane,

I haven't tried yet but will do soon.

Regards,
Ian
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10729491
You haven't tried it yet - yet you accept it as an answer and grade me with a B! WHat'z up with that?

Shane
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question