Solved

Invisible Button

Posted on 2003-11-16
7
489 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

13 Experts available now in Live!

Get 1:1 Help Now