Solved

Button question with BCB3

Posted on 2000-04-17
4
190 Views
Last Modified: 2010-04-02
Hello,

I have a question on BCB3 regarding a hoverbutton. I have a form which has 9 Buttons on it. This button allows me to have a Mouse Enter and Exit. What I'm trying to do is change the color of text or the background of the button itshelf. Can someone please explain to me how this can be done. I've worked on this for two weeks without any luck at all.

THanks
Clinton
0
Comment
Question by:Clinton112299
  • 2
4 Comments
 
LVL 1

Expert Comment

by:jbodom
ID: 2723559
Not an easy task.  Get this file and look under standard controls.  It explains about what you are trying to do.

http://homepages.go.com/~damonchandler/vcl_faq.zip (10 KB)
0
 
LVL 1

Accepted Solution

by:
wolfpackinc earned 50 total points
ID: 2742078

Download ToolBar97 Package (Free!) at:
http://members.xoom.com/wolfpackinc/
The button will work with this code below. If you set the Flat Property to false only the text will change. But if you set it to true both the background and text will change.

void __fastcall TForm1::ToolbarButton971MouseExit(TObject *Sender)
{
ToolbarButton971->Font->Color = clBlack;
ToolbarButton971->Color = clBtnFace;
}
//--------------------------------------

void __fastcall TForm1::ToolbarButton971MouseMove(TObject *Sender,
      TShiftState Shift, int X, int Y)
{
ToolbarButton971->Font->Color = clBlue;
ToolbarButton971->Color = clWhite;
}
0
 

Author Comment

by:Clinton112299
ID: 2744160
Thanks wolfpackinc,

One question, will this act like a mouse enter and exit. I was trying to spice up my boring from with something like this.

Clinton
0
 
LVL 1

Expert Comment

by:wolfpackinc
ID: 2744594
Yes It will act like a mouse enter and exit. I tryed using  enter and exit though and it did'nt work.The other buttons would'nt recieve focus unless you clicked them. So I decided to try a third party button and..figured it out from there. Thanks for the points you are the first question I answered.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

813 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

17 Experts available now in Live!

Get 1:1 Help Now