Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2012, 10:39 AM
Syamala Syamala is offline
Junior Member
 
Join Date: Jul 2012
Posts: 8
Default How to Show bitmap image in Tspeedbutton when it is in disables state

I am dyanamicaaly creating speedbuttons in tab change, i want to made speed button disabled , when it is disabled it is not showing the loaded image. how to see the image on speed button when it is in disable state. I am using the code
SpeedButton,Newimage.Glyph.LoadFromFile('Path')
Reply With Quote
  #2  
Old 07-27-2012, 01:17 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 6,699
Default

works fine with me:
Code:
procedure TFormKOCExport.Button1Click(Sender: TObject);
begin
  SpeedButton1.Enabled := not SpeedButton1.Enabled;
end;

procedure TFormKOCExport.Button2Click(Sender: TObject);
begin
  SpeedButton1.Glyph.LoadFromFile('C:\temp\attachment.bmp');
end;
Image is a 16x16 bmp with background color filled out, but obviously this becomes transparent
This code is so straight-forward that i'm guessing the problem is in the bitmap itself
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:06 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.