Board index » delphi » Transparent TListView ?

Transparent TListView ?

you can get one but it works _very_ poorly.  this is generally the result
when trying to make a TWinControl transparent.  you can override the
CreateParams and achive a transparent control but it will not behave like
the transparent TGraphic controls that we all are used to.  if you get one
that works resonablly well i'd be more than interested to know how - i've
written a few transparent TWinControls but usually have problems with
flicker or poor design time use (backgrounds not erasing and such).  I'm not
sure how the dragging of items would affect this whole senerio - my guess is
that it would complicate things

ian

 

Re:Transparent TListView ?


That is because the transparency is only partially supported in Windows. It
practically not working and one have to do a lot of things manually.
Quote
Ian Atkinson wrote:
> you can get one but it works _very_ poorly.  this is generally the result
> when trying to make a TWinControl transparent.  you can override the
> CreateParams and achive a transparent control but it will not behave like
> the transparent TGraphic controls that we all are used to.  if you get one
> that works resonablly well i'd be more than interested to know how - i've
> written a few transparent TWinControls but usually have problems with
> flicker or poor design time use (backgrounds not erasing and such).  I'm not
> sure how the dragging of items would affect this whole senerio - my guess is
> that it would complicate things

> ian

Re:Transparent TListView ?


anyone can post some code ?

Thanx

Re:Transparent TListView ?


I think noone, because this is impossible.

--
Sorry for terrible english.
Sergey Prilutsky.
mail: pser...@hotmail.com (please do not email files larger then 128Kb)
Moscow. Russia.

Re:Transparent TListView ?


that is why i said it would work _very_  poorly instead of saying "yes this
is easy and wonderful"

ian

Re:Transparent TListView ?


Not in Delphi, but I have done it in Visual C++. You override the erase
background message for the window.

Pete

Quote
"G...@hotmail.com" wrote:
> anyone can post some code ?

> Thanx

Re:Transparent TListView ?


Quote
Pete Goodwin <pgo...@netcomuk.co.uk> wrote in message

news:37C79AD4.E11C070D@netcomuk.co.uk...

Quote
> Not in Delphi, but I have done it in Visual C++. You override the erase
> background message for the window.

Can you post the source for C++ please ? i'll try to convert it to delphi.

Thanx

Re:Transparent TListView ?


Quote
>Not in Delphi, but I have done it in Visual C++. You override the erase
  ^^^^^^^^^^^^
>background message for the window.

Interesting thing, I thought that I can override any message in Delphi :-)

--
Sorry for terrible english.
Sergey Prilutsky.
mail: pser...@hotmail.com (please do not email files larger then 128Kb)
Moscow. Russia.
Pete Goodwin ??? a ???? <37C79AD4.E11C0...@netcomuk.co.uk> ...

Re:Transparent TListView ?


My advice would be to use "SetRegion" - messy but it works

- Ben Stewart
NeuralAbyss Software
http://get.to/neuralabyss.software

Quote
"G...@hotmail.com" wrote:
> anyone can post some code ?

> Thanx

Re:Transparent TListView ?


Gentlemen/Gentlewomen

Check out the following site, they have many controls that allow you to
set the background to transparent

 Cool Tools

Mark Moss

Quote
NeuralAbyss Software wrote:
> My advice would be to use "SetRegion" - messy but it works

> - Ben Stewart
> NeuralAbyss Software
> http://get.to/neuralabyss.software

> "G...@hotmail.com" wrote:

> > anyone can post some code ?

> > Thanx

Re:Transparent TListView ?


You may also consider creating an OnCustomDrawItem event handler and instead
of using FillRect to clear the background, use the Draw method to paint the
background onto the ListView canvas then print your text.

--
Juan Rodriguez
TekMetrics Certified Master Delphi Programmer

...living on earth is expensive ... but it comes with a free trip around the
sun!

Other Threads