Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Invisible Button

Posted on 2003-11-16
7
Medium Priority
?
538 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 23

Accepted Solution

by:
Ferruccio Accalai earned 80 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
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!

 
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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

688 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