Board index » cppbuilder » TImage with TGroupBox, BCB6

TImage with TGroupBox, BCB6


2005-11-08 11:07:14 PM
cppbuilder68
I have both a TGroupBox and a TImage on one form.
I'd like to position the TImage on top of the TGroupBox, but not inside the
TGroupBox; however, the TGroupBox always lies on top of the TImage. I have
selected "Bring to Front" on the TImage and "Send to Back" for the
TGroupBox, but nothing changes.
How do make a TImage appear on top of a TGroupBox?
 
 

Re:TImage with TGroupBox, BCB6

poojo hackma wrote:
Quote
I'd like to position the TImage on top of the TGroupBox, but not inside the
TGroupBox;
What would be the difference ?
You could place a TImage /on/ a TGroupBox. Or you could place a TImage
/on/ the same component as the TGropupBox is placed.
Are you doing that with the IDE or at runtime ?
Quote
however, the TGroupBox always lies on top of the TImage. I have
selected "Bring to Front" on the TImage and "Send to Back" for the
TGroupBox, but nothing changes.

How do make a TImage appear on top of a TGroupBox?
Place it /on/ a TGoupBox and make it's size equal to that of the
TGroupBox.
Hans.
 

Re:TImage with TGroupBox, BCB6

Quote
>I'd like to position the TImage on top of the TGroupBox, but not inside
>the TGroupBox;

What would be the difference ?
The Image is a company logo that would nicely fill in some "dead space" both
inside the GroupBox and on the Main Form. Depending on options, one
GroupBox or another is displayed.
Quote

You could place a TImage /on/ a TGroupBox. Or you could place a TImage
/on/ the same component as the TGropupBox is placed.

Are you doing that with the IDE or at runtime ?
IDE. Every time I place the TImage on top of the TGroupBox, the TGroupBox
shows up on top of the TImage. It's only looks, but it looks tacky.
Optimally, I'd like something similar to a z-index used with <DIV>tags in
HTML so the TImage appears to float above and at the upper right corner of
the TGroupBox.
It may not be possible in Borland. Oh well. Don't worry about it. It is
just fluff for the program anyway.
 

{smallsort}

Re:TImage with TGroupBox, BCB6

poojo hackma wrote:
Quote
IDE. Every time I place the TImage on top of the TGroupBox, the TGroupBox
shows up on top of the TImage. It's only looks, but it looks tacky.
Do you mean that you see the borders of the TGroupBox ? Do you
still see the TImage ? How is Align of TImage?
Even if Image->Align == alClient then you will see the borders of
the TGoupBox. If you do not want that then take a TPanel.
Hans.
 

Re:TImage with TGroupBox, BCB6

Quote
Do you mean that you see the borders of the TGroupBox ? Do you
still see the TImage ? How is Align of TImage?
I can see TImage's border behind the TGroupBox, but I can not get the
TImage to appear on top of the TGroupBox.
Quote
Even if Image->Align == alClient then you will see the borders of
the TGoupBox.
My Image->Align = alCustom. Setting it to alClient made the small TImage
take up the entire form.
Quote
If you do not want that then take a TPanel.
That may be what I have to do for the effect I want.
Too bad I can't post a pic here. That would have made describing this
problem *much* easier!
 

Re:TImage with TGroupBox, BCB6

poojo hackma wrote:
Quote
I can see TImage's border behind the TGroupBox, but I can not get the
TImage to appear on top of the TGroupBox.
>Even if Image->Align == alClient then you will see the borders of
>the TGoupBox.

My Image->Align = alCustom. Setting it to alClient made the small TImage
take up the entire form.
Then you did not place the TImage on the TGroupbox. You placed it on
the TForm then.
alCustom ? Is that bcb6 ? Bcb5 does not know alCustom. What is it ?
Quote
>If you do not want that then take a TPanel.
Too bad I can't post a pic here. That would have made describing this
problem *much* easier!
Please post a picture in borland.public.attachments..
Well you did already I see now. In such a case do tell that here.
Well the picture clearly demonstrates that you placed the TImage on the
TForm. Now you cannot place it on the groupbox by just moving it around.
Just try to place another TImage directly on a TGroupBox.
Hans.
 

Re:TImage with TGroupBox, BCB6

Hans,
I am using BCB6. My apologies if I somehow misled you to believe it was
BCB5.
Also, I do not want the TImage inside of the TGroupBox; I want it to be On
Top Of the TGroupBox.
When I tried posting the picture for you earlier on
borland.public.attachments, I got a reply that it was not accepted because
of the attachment. I never knew it was there until I saw that you had been
there and seen it. Great! Basically, I want the TImage where it is and the
two TGroupBoxes where they are, but I want the TImage to show up on top.
(FYI: The TImage contains a small company logo.)
 

Re:TImage with TGroupBox, BCB6

poojo hackma wrote:
Quote
When I tried posting the picture for you earlier on
borland.public.attachments, I got a reply that it was not accepted
because of the attachment. I never knew it was there until I saw
that you had been there and seen it. Great! Basically, I want the
TImage where it is and the two TGroupBoxes where they are, but I want
the TImage to show up on top. (FYI: The TImage contains a small
company logo.)
To do this simply, you're going to have to stop using TGroupBox, and use a
TBevel and a TLabel to simulate a TGroupBox. It looks exactly the same. Set
the TBevel's Shape to bsFrame.
Select all the components in the group box, press Ctrl+X, delete the group
box, place a TBevel on the form, and set its alignment like you had the
TGroupBox. Now, place a TLabel on the bevel, and move it until it is over
the bevel, so that it looks like a TGroupBox. Now click the bevel, and
press Ctrl+V. You'll have to move the components back into place, but it
will allow you to place a TImage over the bevel.
HTH
Jonathan
 

Re:TImage with TGroupBox, BCB6

Cool! Thanks.
"Jonathan Benedicto" wrote
Quote
To do this simply, you're going to have to stop using TGroupBox, and use a
TBevel and a TLabel to simulate a TGroupBox. It looks exactly the same.
Set the TBevel's Shape to bsFrame.

HTH

Jonathan