Solved

Invisible Button

Posted on 2003-11-16
7
490 Views
Last Modified: 2010-04-05
Hey,

I have a bitmap as a background and I dont want to put seperate images as a button. So I have included the button as a bitmap.
To make it when I click on one of the buttons (included with the bitmap) I put a button over each image and set its visible option to FALSE. But when I click on the image it doesnt do anything even though the Click function is set so it goes to another form. I tried doing it with the Visible Option to TRUE and it works but I need it to be seen through.

How would I make a button invisible but you can still click it ?
So I can put a invisible button over a background image.

Cheers,

Computer Programer
0
Comment
Question by:computerprogramer
7 Comments
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 20 total points
ID: 9760416
just add TImage components with no pitcure assigned and transparent property true instead of buttons ....then every TImage with its onclick event....
0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 9760510
Try something like this

On the image click procedure:

formx.buttonx.onclick(sender); //this references the buttons onclick procedure

Regards,

Hypoviax
0
 
LVL 2

Expert Comment

by:gangsterboss
ID: 9760615
u could even try it as a image map
split the image up into sections and set the onclick procedure
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Expert Comment

by:FrankTheRat
ID: 9762299
The above suggestions represent your only viable approaches; an invisible control cannot receive input focus so you'll never be able to click it.

FrankTheRat
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 9762738
use a TShape

- set brush.style to bsClear
- set pen.style to psClear

shape is now invisible on your background

for clicking use
the onMouseDown and/or onMouseUp-event of the TShape

meikl ;-)

0
 
LVL 5

Expert Comment

by:Hypoviax
ID: 9768424
Franktherat,

You can set the focus of a control and thus it can get the focus to click it. Besides my code would work as their is no actual clicking but references to click procedures. Therefore the click is simulated.

Regards,

Hypoviax
0
 

Expert Comment

by:iman_a_r
ID: 12028152
If it isnt necessary to focuse on this button you can use SpeedButton component.
It can be transparent inseted of invisible.
Also have a FLAT property to fully transparent.

When you use this component it is like a button without any caption.
If Transparent propert be true just button border will be shown and
if Flat propert set to True Nothing will be shown.
But when mouse is over button , border of button will be highlight.

Best Regard.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

932 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now