Solved

Button question with BCB3

Posted on 2000-04-17
4
208 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
[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
  • 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

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!

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…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

623 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