Solved

Invisible Button

Posted on 2003-11-16
7
504 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

739 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