![]() |
Delphi 7: ActionBand Glyph Schatten
Liste der Anhänge anzeigen (Anzahl: 1)
Meine Konfiguration:
Delphi 7 + Update 1 + 19151_delphi_7.0_actionbands_patch_all_languages Mein Problem: Ich setze in einer Anwendung eine ActionToolBar ein. Auf der Toolbar befindet sich ein Button mit einem Image aus einer ImageList. Wird das Programm unter Windows XP SP 2 ausgeführt, wird anstatt einem Schatten des Button-Images ein Viereck angezeigt. Die Darstellung unter Windows XP SP 1 sowie Windows 2000 ist dagegend in Ordnung. Kennt jemand das Problem und hat ein Lösung? Danke im Vorraus Sebastian Edit (Lösung): Nachdem ich in den Quellen von TurboDelphi wo der Fehler nicht aufritt nachgesehen habe hier die Lösung. In der Datei XPActnCtrls.pas muss in der Prozedur TXPStyleButton.DrawGlyph(const Location: TPoint) folgende Änderung gemacht werden:
Delphi-Quellcode:
procedure TXPStyleButton.DrawGlyph(const Location: TPoint);
var OldBrushColor: TColor; SelBmp: TBitmap; NewLocation: TPoint; ActionList: TCustomActionList; begin NewLocation := Location; if not ActionBar.DesignMode and MouseInControl and not IsChecked and Enabled and ActionClient.HasGlyph then begin OldBrushColor := Canvas.Brush.Color; SelBmp := TBitmap.Create; try ActionList := ActionClient.Action.ActionList; if ActionList.Images.GetBitmap(ActionClient.ImageIndex, SelBmp) then begin Canvas.Brush.Color := GetShadowColor(ActionBar.ColorMap.SelectedColor); SelBmp.Width := ActionList.Images.Width; SelBmp.Height := ActionList.Images.Width; ActionList.Images.Draw(SelBmp.Canvas, 0, 0, ActionClient.ImageIndex, dsNormal, itMask); // Eingefüge Zeile DrawState(Canvas.Handle, Canvas.Brush.Handle, nil, SelBmp.Handle, 0, NewLocation.X + 1, NewLocation.Y + 1, 0, 0, DST_BITMAP or DSS_MONO); end; finally SelBmp.Free; Canvas.Brush.Color := OldBrushColor; end; if not IsChecked then begin Dec(NewLocation.X); Dec(NewLocation.Y); end; end; if not (csDesigning in ComponentState) and ((FState = bsDown) and not IsChecked) and IsMouseButtonPressed then begin Inc(NewLocation.X); Inc(NewLocation.Y); end; inherited DrawGlyph(NewLocation); end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:29 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