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

x
?
Solved

Button question with BCB3

Posted on 2000-04-17
4
Medium Priority
?
215 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 200 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

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

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…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

715 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