Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing the appearance of TBitBtn

Status
Not open for further replies.

baptul

Programmer
Mar 22, 2003
8
0
0
PL
I want to change the appearance of TBitBtn when i click on it. How can I do this??? I want TBitBtn to look like pushed button.
 
Hello.

How about using a TImage as a Button, you can have 2 different state images, on the OnMouseDown event you load a picture and on the OnMouseUp you load another picture and you can use the OnClick event just as you would for a TButton. You can also look through many different freeware button offered on
Hope this helps :)
 
I have seen some software that has various images
that are installed on the harddrive. you could
load these at runtime thusly.

void __fastcall TForm1::BitBtn1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
BitBtn1->Glyph->LoadFromFile ("image2.bmp");
}


void __fastcall TForm1::BitBtn1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
BitBtn1->Glyph->LoadFromFile ("image1.bmp");
}

tomcruz.net
 
you could also load these at start of the program to an
image object and use assign to change the images.

maybe ???

tomcruz.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top