![]() |
Ein Icon in ein SpeedButton einbauen!
Hi Leute, kann mir jemand sagen, wie ich ein ICON in ein SpeedButton einbauen kann?
Wie ich eine Grafik hineinbekomme weiss ich. Nur ich finde nichts für ein ICON! |
Das geht nur etwas umständlich:
Code:
[b]function[/b] CreateBitmapFromIcon(Icon: TIcon): TBitmap;
[b]begin[/b] Result := TBitmap.Create; [b]try[/b] Result.Width := Icon.Width; Result.Height := Icon.Height; Result.Canvas.Draw(0, 0, Icon); [b]except[/b] Result.Free; [b]raise[/b]; [b]end[/b]; [b]end[/b]; bmp := CreateBitmapFromIcon(Application.Icon); [b]try[/b] SpeedBtn.Glyph.Assign(bmp); [b]finally[/b] bmp.Free; [b]end[/b]; |
Hi, muß ich das bei allen Buttons, wo ich ein Icon haben möchte so machen?
Und wie kann ich dann genau eines von mir bestimmtes Icon zum Button zuweisen? |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:30 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz