views:

315

answers:

5

I'm looking for a simple, transparent checkbox component that properly supports XP/Vista/7 theming.

It should also work with Delphi 7.

I've found a component on Torry's that's not working properly, and I know that Raize components has a transparent checkbox - but I'm obviously not going to pay $300 for the entire package just to get this single component.

I've also found many other solutions, but none of them support theming.

The main problem is that TCustomCheckBox is a TWinControl descendant, and in order to implement transparency, you need to make a new TGraphic descendant control from ground up.

Any ideas?

A: 

Raize Components is overkill for just this component, but much more capable and supports transparency in a whole load more components. Once you have it, you'll appreciate the other items greatly. I'd say it is the solution you are looking for.

mj2008
If Raize was selling their components separately, I'd be willing to pay $50 to get just this one.But since my program is already complete in its own, and I just need the checkbox, this is not a viable option.
Steve
Raize Components adds so much more design time experience for standard components. Even when you use none of the Raize components, it pays for itself :-)
Jeroen Pluimers
Guys are you getting paid for this by Raize? No way I'm going to pay hundreds of dollars for something I won't use. (My app is ready, I just need this darn checkbox to get fixed)
Steve
@Steve Yes, I understand that, but you will get a load of useful functions and classes too. Of course it is too expensive for one component, but consider it an investment. 8-) I know how much pain Ray went through to support transparency properly, and it would cost more than the components to repeat.
mj2008
A: 

If you can accept an alternative control there is JvXPCheckCtrls.pas with its TJvXPCheckbox component in the JVCL library. http://jvcl.delphi-jedi.org I think (if I remember correct) it is transparent when themes are used.

It's quite a large package which will add to vcl with the installation of Jvcl. And it doesn't cost you a cent.

But remember, the TJvXPCheckbox component is part of their XP-controls package and you cannot simply lift out the component as a standalone. You will need the installation of Jedi and to get the core code and necessary theme handling to use it. - Its Mozilla Public Licence ("MPL") version 1.1.

Tool
I've tried this component a while back but it didn't work out. If I remember correctly, it supported skinning (it had office style look, etc.) but not OS-level theming.
Steve
A: 

I use AlphaControls for some of my programs - all of their components are skinnable and have reasonably powerful graphics handling options. A lot of the components also have more features than their corresponding Delphi standard components - some I just use for those functions alone. There's a free Lite version available at www.alphaskins.com - it may just be what you're after. It's not Vista/7 theme-aware, mind you. We use Delphi 2010 and vista/7 theme awareness is built into the standard VCL there, although that's probably not the solution you were hoping for.

Justin
A: 

LMD-Tools SE is free, works great on Delphi 7 and has a checkbox component that has a transparency property. I've recently used TLMDCheckbox with its transparency property enabled with Delphi 7.

http://www.lmdinnovative.com/download/index.php#LMD

Download file: setupse10d7.zip. Sorry, I can't post the whole path (url) since I don't have enough juice yet.

This should fix you up :).

ShawnH.

Thank you, this is the best solution so far.But I'm out of luck. It's working nice on TImages and TShapes, but I'm using a third party control (it produces a good looking gradient and is called TManyShape) as a background of the checkbox. LMDCheckbox doesn't support this component, must be the way TManyShape draws itself :-(
Steve
A: 

Not sure if this will help, but I ran into what I think is the same problem when working with the TMSSmooth controls: the label of a checkbox place on a form looked terrible because it was not transparent.

Their demo/example programs had nice looking checkboxes so I took a look at their sample code.

Turns out they reduced the width of the checkbox component to 13 so that only the box itself and no caption shows. Then they added a TLabel for the caption.

Seemed like a clever workaround to me.

Hope this helps.

Tom1952
Yes, but TLabels can't have focus. When you tab to a checkbox, it will have a focus rectangle surrounding the text part. I think this is a good UI feature and it could be problematic and confusing to some users if done otherwise.
Steve