Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Glyph des SpeedButtons in ein Picture schreiben (https://www.delphipraxis.net/81452-glyph-des-speedbuttons-ein-picture-schreiben.html)

xZise 27. Nov 2006 17:01


Glyph des SpeedButtons in ein Picture schreiben
 
Ich würde gerne das Glyph eines SpeedButtons als Picture/Bitmap zur verfügung haben (dabei wird es auch noch resized).
Wie funktioniert das :D

Balu der Bär 27. Nov 2006 17:06

Re: Glyph des SpeedButtons in ein Picture schreiben
 
Öhm hallo? Was ist dein Problem?

Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
  test: TBitmap;
  test1: TPicture;
begin
  test := TBitmap.Create;
  test := SpeedButton1.Glyph;
  //etc pp...
  test1.Bitmap := test;
end;

xZise 27. Nov 2006 17:08

Re: Glyph des SpeedButtons in ein Picture schreiben
 
Ja das hatte ich auch, aber ich muss es resizen.

Und da kenne ich die Funktion "StrechDraw" ;) Das ist das Problem.

Balu der Bär 27. Nov 2006 17:10

Re: Glyph des SpeedButtons in ein Picture schreiben
 
Ja... und? Ich weiß immer noch nicht was genau du wissen möchtest, ist es dir nicht möglich eine eindeutige Frage zu stellen oder stehe ich grad auf dem Schlauch?

xZise 27. Nov 2006 17:14

Re: Glyph des SpeedButtons in ein Picture schreiben
 
Delphi-Quellcode:
BitMap.Canvas.StrechDraw(Rect(0,0,20,20), <TGraphic>)
Okay sry: Ich brauche eine TGraphic... Und die krieg ich nicht von TBitMap.

Martin K 27. Nov 2006 17:17

Re: Glyph des SpeedButtons in ein Picture schreiben
 
TBitmap ist eine TGraphic:
Delphi-Quellcode:
  ...StretchDraw(Rect(0,0,20,20), SpeedButton1.Glyph);

DP-Maintenance 27. Nov 2006 17:39

DP-Maintenance
 
Dieses Thema wurde von "SirThornberry" von "Object-Pascal / Delphi-Language" nach "VCL / WinForms / Controls" verschoben.

xZise 27. Nov 2006 19:16

Re: Glyph des SpeedButtons in ein Picture schreiben
 
Ah okay ;)


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:03 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz