BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Picture on TPanel

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Henk van Winkoop
Guest





PostPosted: Sun Feb 12, 2006 3:03 pm    Post subject: Picture on TPanel Reply with quote



Hello,

I developped an application using a TPanel as a base-working-ground that
covers all client window.
During runtime I can handle (place/erase/move) all kinds of objects on this
TPanel.

Now I would like to have a background picture on this TPanel for 'beauty'
reason.
This is not possible.

I cannot use a TImage as a base-working-ground because I use many specific
TPanel properties like 'ControlCount' which are not part of a TImage.

Putting a TPanel over a TImage does not work as TPanel can not be made
transparant. (As far as I know).

Somebody has any idea how to put a picture 'under' a TPanel?

Regards,

Henk
Back to top
HF
Guest





PostPosted: Sun Feb 12, 2006 4:03 pm    Post subject: Re: Picture on TPanel Reply with quote



You can put a TImage on the Panel with Align=alClient , Stretch= true so
will cover whole Panel.
That TImage will be also in Controls array of your Panel so take care that
you don't delete it .

-minas
Back to top
Henk van Winkoop
Guest





PostPosted: Sun Feb 12, 2006 9:03 pm    Post subject: Re: Picture on TPanel Reply with quote



Thanks for your advise,

I used a little trick to solve the problem,

I just put an TImage on the TPanel and with all
Controls/ControlCount actions I dynamically cast/check
for non-TImage and use as object count 'ControlCount-1'

No nice programming but it work wonderfull,

Regards,

Henk


"HF" <min_charLOOK@ATyahooADD_DOTgr (HellenicFire)> schreef in bericht
news:43ef55c4 (AT) newsgroups (DOT) borland.com...
Quote:
You can put a TImage on the Panel with Align=alClient , Stretch= true so
will cover whole Panel.
That TImage will be also in Controls array of your Panel so take care that
you don't delete it .

-minas

Back to top
Hans Galema
Guest





PostPosted: Sun Feb 12, 2006 9:03 pm    Post subject: Re: Picture on TPanel Reply with quote

HF wrote:

Quote:
That TImage will be also in Controls array of your Panel so take care that
you don't delete it .

You can delete it if you want. But you need -at program end, or at deleting
the form- not if you asigned an Owner. The Owner does not have to be the TPanel.

Hans.
Back to top
JD
Guest





PostPosted: Mon Feb 13, 2006 6:03 am    Post subject: Re: Picture on TPanel Reply with quote

"HF" <min_charLOOK@ATyahooADD_DOTgr (HellenicFire)> wrote:
Quote:

[...] That TImage will be also in Controls array of your
Panel so take care that you don't delete it .

The VCL is designed to cope with such things as dynamically
adding and removing controls. Dynamically deleting the TPanel
or the TImage is perfectly ok. However, issues may arise with
code that executes after the object's destruction but that's
the programers responsibility.

~ JD
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.