Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mo 22.10.07 17:31 
Ich hab die TColorButton Komponente mal erweitert
im Entwurfsmodus funktioniert auch alles ganz schön aber im Laufzeitmodus kriege ich ein vollkommen neue Komponente angezeigt!!!
Wie geht denn das?

Es sollte ein geladenes Bild oder ein Farbverlauf als Eckiger Button (ROundW und RoundH auf 0 gesetzt) engezeigt werden
stattdessen kommt das: [url=imageshack.us]user defined image[/URL]
der linke ist wenn die maus drüber ist

selbst wenn meine zeichnfunktion nicht aufgerufen wird (auskommentiert) wird in entwurfsmodus nichts und im laufzeitmodus dieser seltsame button angezeigt

Source:
ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
186:
187:
188:
189:
190:
191:
192:
193:
194:
195:
196:
197:
198:
199:
200:
201:
202:
203:
204:
205:
206:
207:
208:
209:
210:
211:
212:
213:
214:
215:
216:
217:
218:
219:
220:
221:
222:
223:
224:
225:
226:
227:
228:
229:
230:
231:
232:
233:
234:
235:
236:
237:
238:
239:
240:
241:
242:
243:
244:
245:
246:
247:
248:
249:
250:
251:
252:
253:
254:
255:
256:
257:
258:
259:
260:
261:
262:
263:
264:
265:
266:
267:
268:
269:
270:
271:
272:
273:
274:
275:
276:
277:
278:
279:
280:
281:
282:
283:
284:
285:
286:
287:
288:
289:
290:
291:
292:
293:
294:
295:
296:
297:
298:
299:
300:
301:
302:
303:
304:
305:
306:
307:
308:
309:
310:
311:
312:
313:
314:
315:
316:
317:
318:
319:
320:
321:
322:
323:
324:
325:
326:
327:
328:
329:
330:
331:
332:
333:
334:
335:
336:
337:
338:
339:
340:
341:
342:
343:
344:
345:
346:
347:
348:
349:
350:
351:
352:
353:
354:
355:
356:
357:
358:
359:
360:
361:
362:
363:
364:
365:
366:
367:
368:
369:
370:
371:
372:
373:
374:
375:
376:
377:
378:
379:
380:
381:
382:
383:
384:
385:
386:
387:
388:
389:
390:
391:
392:
393:
394:
395:
396:
397:
398:
399:
400:
401:
402:
403:
404:
405:
406:
407:
408:
409:
410:
411:
412:
413:
414:
415:
416:
417:
418:
419:
420:
421:
422:
423:
424:
425:
426:
427:
428:
429:
430:
431:
432:
433:
434:
435:
436:
437:
438:
439:
440:
441:
442:
443:
444:
445:
446:
447:
448:
449:
450:
451:
452:
453:
454:
455:
456:
457:
458:
459:
460:
461:
462:
463:
464:
465:
466:
467:
468:
469:
470:
471:
472:
473:
474:
475:
476:
unit ClButton;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, StdCtrls, Buttons, ExtCtrls;

type
  TGradientOrientation = (goVertical, goHorizontal);

  TPixelRec = packed record
    case Boolean of
      true:  (Color: TColor);
      false: (r, g, b, Reserved: Byte);
  end;

  TClButton = class(TButton)
  private
    FCanvas: TCanvas;
    IsFocused: Boolean;
    FBackColor: TColor;
    FForeColor: TColor;
    FHoverColor: TColor;
    FBackColor2: TColor;
    FHoverColor2: TColor;
    FClickColor,FClickColor2: TColor;
    FPic,Fpic2,FPic3:TPicture;
    FRoundH,FRoundW,FGradientFact,FGradientFact2,FGradientFact3:Integer;
    FHover:Boolean;
    procedure SetBackColor(const Value: TColor);
    procedure SetForeColor(const Value: TColor);
    procedure SetHoverColor(const Value: TColor);
    procedure SetBackColor2(const Value: TColor);
    procedure SetHoverColor2(const Value: TColor);
    procedure SetRoundW(const Value: Integer);
    procedure SetRoundH(const Value: Integer);
    procedure SetGradientFact(const Value: Integer);
    procedure SetGradientFact2(const Value: Integer);
    procedure SetGradientFact3(const Value: Integer);
    procedure SetPicture(const Value: TPicture);
    procedure SetPictureHover(const Value: TPicture);
    procedure SetPictureDown(const Value: TPicture);
    procedure SetClickColor(const Value: TColor);
    procedure SetClickColor2(const Value: TColor);
    procedure DrawPicture(Pic:TPicture);

  protected
    procedure CreateParams(var Params: TCreateParams); override;
    procedure WndProc(var Message: TMessage); override;

    procedure SetButtonStyle(Value: Boolean); override;
    procedure DrawButton(Rect: TRect; State: UINT);

    procedure CMEnabledChanged(var Message: TMessage); message CM_ENABLEDCHANGED;
    procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
    procedure CNMeasureItem(var Message: TWMMeasureItem); message CN_MEASUREITEM;
    procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;

  published
    property BackColor: TColor read FBackColor write SetBackColor default clBtnFace;
    property ForeColor: TColor read FForeColor write SetForeColor default clBtnText;
    property HoverColor: TColor read FHoverColor write SetHoverColor default clBtnFace;
    property BackColor2: TColor read FBackColor2 write SetBackColor2 default clBtnFace;
    property HoverColor2: TColor read FHoverColor2 write SetHoverColor2 default clBtnFace;
    property ClickColor: TColor read FClickColor write SetClickColor default clBtnFace;
    property ClickColor2: TColor read FClickColor2 write SetClickColor2 default clBtnFace;
    property RoundH: Integer read FRoundH write SetRoundH default 10;
    property RoundW: Integer read FRoundW write SetRoundW default 10;
    property GradientFact: Integer read FGradientFact write SetGradientFact default 0;
    property GradientFactHover: Integer read FGradientFact2 write SetGradientFact2 default 0;
    property GradientFactDown: Integer read FGradientFact3 write SetGradientFact3 default 0;
    property Picture: TPicture read FPic write SetPicture;
    property PictureHover: TPicture read FPic2 write SetPictureHover;
    property PictureDown: TPicture read FPic3 write SetPictureDown;

  end;

procedure Register;

implementation

procedure DrawGradient(const Canvas: TCanvas; Color1, Color2: TColor;
                       ARect: TRect; GradientOrientation: TGradientOrientation);
var
  c1, c2, c: TPixelRec;  //for easy access to RGB values as well as TColor value 
  x, y: Integer;         //current pixel position to be set
  OldPenWidth: Integer;  //Save old settings to restore them properly 
  OldPenStyle: TPenStyle;//see above 
begin 
  c1.Color := ColorToRGB(Color1);  //convert system colors to RGB values 
  c2.Color := ColorToRGB(Color2);  //if neccessary
  OldPenWidth := Canvas.Pen.Width; //get old settings 
  OldPenStyle := Canvas.Pen.Style; 
  Canvas.Pen.Width:=1;             //ensure correct pen settings 
  Canvas.Pen.Style:=psInsideFrame; 

  case GradientOrientation of 
    goVertical:
    begin 
      for y := 0 to ARect.Bottom - ARect.Top do 
      begin 
        c.r := Round(c1.r + (c2.r - c1.r) * y / (ARect.Bottom - ARect.Top)); 
        c.g := Round(c1.g + (c2.g - c1.g) * y / (ARect.Bottom - ARect.Top)); 
        c.b := Round(c1.b + (c2.b - c1.b) * y / (ARect.Bottom - ARect.Top)); 
        Canvas.Brush.Color := c.Color; 
        Canvas.FillRect(Classes.Rect(ARect.Left, ARect.Top + y,ARect.Right, ARect.Top + y + 1));
      end; 
    end;
    goHorizontal:
    begin 
      for x := 0 to ARect.Right - ARect.Left do
      begin 
        c.r := Round(c1.r + (c2.r - c1.r) * x / (ARect.Right - ARect.Left));
        c.g := Round(c1.g + (c2.g - c1.g) * x / (ARect.Right - ARect.Left)); 
        c.b := Round(c1.b + (c2.b - c1.b) * x / (ARect.Right - ARect.Left));
        Canvas.Brush.Color := c.Color;
        Canvas.FillRect(Rect(ARect.Left + x, ARect.Top,ARect.Left + x + 1, ARect.Bottom));
      end;
    end;
  end;
  Canvas.Pen.Width := OldPenWidth; //restore old settings
  Canvas.Pen.Style := OldPenStyle;
end;

constructor TClButton.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  FCanvas := TCanvas.Create;
  BackColor := clBtnFace;
  BackColor2 := clBtnFace;
  ForeColor := clBtnText;
  HoverColor := clBtnFace;
  HoverColor2 := clBtnFace;
  FClickColor := clBtnFace;
  FClickColor2 := clBtnFace;
  FRoundH:=10;
  FRoundW:=10;
  FHover:=false;
  FPic:=TPicture.Create;
  FPic2:=TPicture.Create;
  FPic3:=TPicture.Create;
end; (*Create*)

destructor TClButton.Destroy;
begin
  FCanvas.Free;
  FPic.Free;
  FPic2.Free;
  FPic3.Free;
  inherited Destroy;
end; (*Destroy*)

procedure TClButton.WndProc(var Message: TMessage);
begin
  if (Message.Msg = CM_MOUSELEAVE) then
  begin
    FHover:=false;
    Invalidate;
  end else if (Message.Msg = CM_MOUSEENTER) then
  begin
    FHover:=true;
    Invalidate;
  end;
  inherited;
end; (*WndProc*)

procedure TClButton.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);
  with Params do Style := Style or BS_OWNERDRAW;
end; (*CreateParams*)

procedure TClButton.SetButtonStyle(Value: Boolean);
begin
  if Value <> IsFocused then
  begin
    IsFocused := Value;
    Invalidate;
  end;
end; (*SetButtonStyle*)

procedure TClButton.CNMeasureItem(var Message: TWMMeasureItem);
begin
  with Message.MeasureItemStruct^ do
  begin
    itemWidth := Width;
    itemHeight := Height;
  end;
end; (*CNMeasureItem*)

procedure TClButton.CNDrawItem(var Message: TWMDrawItem);
var
  SaveIndex: Integer;
begin
  with Message.DrawItemStruct^ do
  begin
    SaveIndex := SaveDC(hDC);
    FCanvas.Lock;
    try
      FCanvas.Handle := hDC;
      FCanvas.Font := Font;
      FCanvas.Brush := Brush;
      DrawButton(rcItem, itemState);
    finally
      FCanvas.Handle := 0;
      FCanvas.Unlock;
      RestoreDC(hDC, SaveIndex);
    end;
  end;
  Message.Result := 1;
end; (*CNDrawItem*)

procedure TClButton.CMEnabledChanged(var Message: TMessage);
begin
  inherited;
  Invalidate;
end; (*CMEnabledChanged*)

procedure TClButton.CMFontChanged(var Message: TMessage);
begin
  inherited;
  Invalidate;
end; (*CMFontChanged*)


procedure TClButton.SetBackColor(const Value: TColor);
begin
  if FBackColor <> Value then
  begin
    FBackColor := Value;
    Invalidate;
  end;
end; (*SetButtonColor*)

procedure TClButton.SetBackColor2(const Value: TColor);
begin
  if FBackColor2 <> Value then
  begin
    FBackColor2 := Value;
    Invalidate;
  end;
end; (*SetButtonColor2*)

procedure TClButton.SetForeColor(const Value: TColor);
begin
  if FForeColor <> Value then
  begin
    FForeColor := Value;
    Invalidate;
  end;
end; (*SetForeColor*)

procedure TClButton.SetHoverColor(const Value: TColor);
begin
  if FHoverColor <> Value then
  begin
    FHoverColor := Value;
    Invalidate;
  end;
end; (*SetHoverColor*)

procedure TClButton.SetHoverColor2(const Value: TColor);
begin
  if FHoverColor2 <> Value then
  begin
    FHoverColor2 := Value;
    Invalidate;
  end;
end; (*SetHoverColor2*)

procedure TClButton.SetClickColor(const Value: TColor);
begin
  if FClickColor <> Value then
  begin
    FClickColor := Value;
    Invalidate;
  end;
end; (*SetHoverColor*)

procedure TClButton.SetClickColor2(const Value: TColor);
begin
  if FClickColor2 <> Value then
  begin
    FClickColor2 := Value;
    Invalidate;
  end;
end; (*SetHoverColor2*)

procedure TClButton.SetRoundW(const Value: Integer);
begin
  if FRoundW <> Value then
  begin
    FRoundW := Value;
    Invalidate;
  end;
end;

procedure TClButton.SetRoundH(const Value: Integer);
begin
  if FRoundH <> Value then
  begin
    FRoundH := Value;
    Invalidate;
  end;
end;

procedure TClButton.SetGradientFact(const Value: Integer);
begin
  if FGradientFact <> Value then
  begin
    FGradientFact := Value;
    Invalidate;
  end;
end;

procedure TClButton.SetGradientFact2(const Value: Integer);
begin
  if FGradientFact2 <> Value then
  begin
    FGradientFact2 := Value;
    Invalidate;
  end;
end;

procedure TClButton.SetGradientFact3(const Value: Integer);
begin
  if FGradientFact3 <> Value then
  begin
    FGradientFact3 := Value;
    Invalidate;
  end;
end;

procedure TClButton.DrawButton(Rect: TRect; State: UINT);
var
  Flags, OldMode: Longint;
  IsDown, IsDefault, IsDisabled: Boolean;
  OldColor: TColor;
  OrgRect: TRect;
  rgn: HRGN;
  tmp:Integer;
  aktColor,aktColor2:TColor;
  aktGradient:Integer;
  tmpImage:TPicture;
begin
  OrgRect := Rect;

  Flags := DFCS_BUTTONPUSH or DFCS_ADJUSTRECT;
  IsDown := State and ODS_SELECTED <> 0;
  IsDefault := State and ODS_FOCUS <> 0;
  IsDisabled := State and ODS_DISABLED <> 0;
  if IsDown then Flags := Flags or DFCS_PUSHED;
  if IsDisabled then Flags := Flags or DFCS_INACTIVE;

  if IsFocused or IsDefault then
  begin
    FCanvas.Pen.Color := clWindowFrame;
    FCanvas.Pen.Width := 1;
    FCanvas.Brush.Style := bsClear;
    FCanvas.Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);
    InflateRect(Rect, - 1, - 1);
  end;

  if IsDown then
  begin
    FCanvas.Pen.Color := clBtnShadow;
    FCanvas.Pen.Width := 1;
    FCanvas.Brush.Color := clBtnFace;
    FCanvas.Rectangle(Rect.Left, Rect.Top, Rect.Right, Rect.Bottom);
    InflateRect(Rect, - 1, - 1);
  end
  else
  begin
    //DrawFrameControl(FCanvas.Handle, Rect, DFC_BUTTON, Flags); //weg sonst klapptFarbverlauf nicht. WARUM???
  end;

  if IsFocused then OffsetRect(Rect, 1, 1);
  OldColor := FCanvas.Brush.Color;

  //Read Status
  If(IsDown) then begin
    aktColor := FClickColor;
    aktColor2 := FClickColor2;
    aktGradient:=FGradientFact3;
    tmpImage:=FPic3;
  end else if(FHover) then begin
    aktColor := HoverColor;
    aktColor2 := HoverColor2;
    aktGradient:=FGradientFact2;
    tmpImage:=FPic2;
  end else begin
    aktColor := FBackColor;
    aktColor2 := FBackColor2;
    aktGradient:=FGradientFact;
    tmpImage:=FPic;
  end;
  if(tmpImage.Graphic<>nil) then DrawPicture(tmpImage)
  else begin
    If(aktGradient>Rect.Bottom-Rect.Top) then aktGradient:=0;
    if(aktGradient>0) then begin
      tmp:=Rect.Bottom;
      Rect.Bottom:=Rect.Top+aktGradient;
      DrawGradient(FCanvas,aktColor,aktColor2,Rect,goVertical);
      Rect.Bottom:=tmp;
      tmp:=Rect.Top;
      Rect.Top:=Rect.Top+aktGradient;
      DrawGradient(FCanvas,aktColor2,aktColor,Rect,goVertical);
      Rect.Top:=tmp;
    end else  DrawGradient(FCanvas,aktColor,aktColor2,Rect,goVertical);
  end;
  FCanvas.Brush.Color := OldColor;
  OldMode := SetBkMode(FCanvas.Handle, TRANSPARENT);
  FCanvas.Font.Color := ForeColor;
  If(IsDown) then begin
    Rect.Top:=Rect.Top+2;
    Rect.Left:=Rect.Left+2;
  end;
  DrawText(FCanvas.Handle, PChar(Caption), -1, Rect, DT_SINGLELINE or DT_CENTER or DT_VCENTER);

  SetBkMode(FCanvas.Handle, OldMode);

  if IsFocused and IsDefault then
  begin
    Font.Style := Font.Style + [fsBold];
  end
  else
  begin
    Font.Style := Font.Style - [fsBold];
  end;

  rgn := CreateRoundRectRgn(3,3,Width - 2,Height - 2,FRoundW,FRoundH);
  SetWindowRgn(Handle, rgn, True);
end; (*DrawButton*)

procedure TClButton.DrawPicture(Pic:TPicture);
begin
 if (Pic <> nil) then
 FCanvas.Draw((Width - Pic.Width) div 2,(Height - Pic.Height) div 2 ,Pic.Graphic);
end;

procedure TClButton.SetPicture(const Value: TPicture);
begin
 if (FPic<> Value) then
 begin
  FPic.Assign(Value);
  Invalidate;
 end;
end;

procedure TClButton.SetPictureHover(const Value: TPicture);
begin
 if (FPic2<> Value) then
 begin
  FPic2.Assign(Value);
  Invalidate;
 end;
end;

procedure TClButton.SetPictureDown(const Value: TPicture);
begin
 if (FPic3<> Value) then
 begin
  FPic3.Assign(Value);
  Invalidate;
 end;
end;

procedure Register;
begin
  RegisterComponents('Beispiele', [TClButton]);
end;

end.


Zuletzt bearbeitet von Flamefire am Mi 24.10.07 15:53, insgesamt 1-mal bearbeitet
Carlo91
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 20



BeitragVerfasst: Mo 22.10.07 17:43 
Titel: ...
Ok wir haben das problem gelöst es lag an einer skinkomponente auf einer anderen Form... :D

MfG Carlo
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 24.10.07 15:52 
ok danke
PS: die komponente darf verwendet werden
wer fehler/performance verbesserungen findet bitte bescheid sagen ^^
jf_stgt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88



BeitragVerfasst: Mo 27.07.09 13:13 
Hallo!

Habe die Komponente von Flamefire auf Delphi 2007 getestet.
Der Thread ist zwar schon älter aber es funktioniert tadellos (mit Laufzeit Themes aktiviert!).
Es muss allerdings die auskommentierte Zeile 377 (DrawFrameControl) wieder eingeblendet werden.

Ich würde allerdings gerne eine dünne Linie um den Button ziehen. Also einfach einen Rand mit ein oder zwei Pixel.
Dies gelingt mir aber nicht. Er zeichnet mir einen Rand aber dieser ist dann nicht mit abgerundeten Ecken (grr).
Hat jemand eine Idee?
Mit den MSDN Funktionen kenne ich mich leider nicht soo aus.
Die Farbe spielt keine Rolle. Diese würde ich dann später über eine Eigenschaft lösen. Mir geht es nur um das Prinzip.
Danke!

Grüße
jf_stgt
jf_stgt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88



BeitragVerfasst: Di 28.07.09 08:01 
Habe jetzt noch einmal versucht eine Linie zu zeichnen, aber es funktioniert nicht.
Habe dazu noch einmal die Prozedur DrawButton (Zeile 337) kopiert und noch einmal aufgerufen weil ich dachte, dann zeichnet er beide Buttons einfach übereinander (unterer natürlich etwas kleiner). Aber dann hat der innere Button keine abgerundeten Ecken, sondern ein Rechteck als Form.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Di 28.07.09 10:40 
wozu msdn funktionen?
Du hast im Button ein canvas (FCanvas) und darauf kannst du ei rechteck zeichen
FCanvas.RoundRect oder etwas in der art...
einfach mal gucken.
jf_stgt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88



BeitragVerfasst: Di 28.07.09 10:58 
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
wozu msdn funktionen?
Du hast im Button ein canvas (FCanvas) und darauf kannst du ei rechteck zeichen
FCanvas.RoundRect oder etwas in der art...
einfach mal gucken.


Danke für die Info. Aber wie kann ich die Linie mit abgerundeten Ecken zeichnen?
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Di 28.07.09 11:21 
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
wozu msdn funktionen?
Du hast im Button ein canvas (FCanvas) und darauf kannst du ei rechteck zeichen
FCanvas.RoundRect oder etwas in der art...
einfach mal gucken.
jf_stgt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 88



BeitragVerfasst: Di 28.07.09 11:33 
user profile iconBoldar hat folgendes geschrieben Zum zitierten Posting springen:
user profile iconFlamefire hat folgendes geschrieben Zum zitierten Posting springen:
wozu msdn funktionen?
Du hast im Button ein canvas (FCanvas) und darauf kannst du ei rechteck zeichen
FCanvas.RoundRect oder etwas in der art...
einfach mal gucken.


Ups. Wer lesen kann ist klar im Vorteil!
Danke nochmal für die Info.