Solved

Button question with BCB3

Posted on 2000-04-17
4
182 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

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

9 Experts available now in Live!

Get 1:1 Help Now