passapik napisał(a)
hej jak mozna wstawic jakiekolwiek tlo do speedbuttona??
używając imagelist:
Delphi syntax:
procedure GetBitmap(Index: Integer; Image: TBitmap);
C++ syntax:
void __fastcall GetBitmap(int Index, Graphics::TBitmap* Image);
Description
Use the GetBitmap method to obtain a particular image in the image list as a bitmap object. Index denotes the index of the image. GetBitmap assigns the image to the TBitmap object passed in as the Image parameter.
Przykład:
Imagelist1.GetBitmap(0, SpeedButton1.Glyph);
lub używając resourcess:
Delphi syntax:
procedure LoadFromResourceName(Instance: THandle; const ResName: string);
C++ syntax:
void __fastcall LoadFromResourceName(unsigned Instance, const AnsiString ResName);
Description
LoadFromResourceName loads the specified bitmap resource along with palette information from a module's executable file.
Instance is the handle of the module that contains the resource.
ResName is the name of the resource to load.
Note: Use this routine to load bitmaps from RES files instead of the LoadBitmap API. LoadBitmap does not support 256-color images.
Przykład:
SpeedButton1.Glyph.LoadFromResourceName(HInstance,'BITMAP_1');
Metod dla SpeedButton1.Glyph oprócz "LoadFromResourceName" jest więcej:
LoadFromFile
LoadFromClipboardFormat
LoadFromStream
LoadFromResourceID
Pewnie i inne sposoby są, mi akurat te dwa przyszły do głowy.