![]() |
deklaration unterscheidet sich von vorheriger ?!?!?
:wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall:
:wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall: :wall:
Delphi-Quellcode:
später im implemtationsteil: (mit STRG + SHIFT + C vervollständigt)
TMyListView = class(TCustomListView)
private FExtTypes: Boolean; FThumbnailThread: TThumbnailThread; FImageList: TImageList; protected public property ExtTypes: Boolean read FExtTypes write FExtTypes; property ImageList: TImageList read FImageList write FImageList; constructor Create(AOwner: TComponent); override; destructor Destroy; override; procedure TreeUpdate(NewRoot: PItemIDList); procedure ChangeBitmap(Bitmap: TBitmap; Index, Width, Heigth: Integer);
Delphi-Quellcode:
Fehlermeldung:
procedure TMyListView.ChangeBitmap(Bitmap: TBitmap; Index, Width, Heigth: Integer);
var ImageIndex: Integer; begin ImageIndex := FImageList.Add(Bitmap, nil); FListView.Items[Index].ImageIndex := ImageIndex; FListView.Items[Index].Caption := Format('%s (%dx%d)', [FListView.Items[Index].Caption, Width, Height]); end; Deklaration von ChangeBitmap unterscheidet sich von vorheriger Deklaration WIE BITTE ?!?! |
Re: deklaration unterscheidet sich von vorheriger ?!?!?
könnte es sein dass die verwendung von "index" zu problemen führt? (weils fett gedruckt wird und so reserviert zu sein scheint)
|
Re: deklaration unterscheidet sich von vorheriger ?!?!?
Lässt sich bei mir ohne Fehlermeldung compilieren.
(Nur die Signaturen kopiert)
Delphi-Quellcode:
unit Unit2;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCTRLs; type TMyListView = class(TCustomListView) private FExtTypes: Boolean; FImageList: TImageList; protected public property ExtTypes: Boolean read FExtTypes write FExtTypes; property ImageList: TImageList read FImageList write FImageList; procedure ChangeBitmap(Bitmap: TBitmap; Index, Width, Heigth: Integer); end; implementation procedure TMyListView.ChangeBitmap(Bitmap: TBitmap; Index, Width, Heigth: Integer); var ImageIndex: Integer; begin ImageIndex := FImageList.Add(Bitmap, nil); end; end. |
Re: deklaration unterscheidet sich von vorheriger ?!?!?
Ich bekomme den Fehler sobald ich den Typen TBitmap in der Deklaration benutze, am Index liegt es nicht. Das ist doch zum Hühner rupfen.. :wall:
|
Re: deklaration unterscheidet sich von vorheriger ?!?!?
dann liegt es vermutlich an den Uses. Stelle sicher das die Unit "windows" die erste in den uses ist
|
Re: deklaration unterscheidet sich von vorheriger ?!?!?
Zitat:
jetzt erstmal wieder beruhigen.. :angel: |
Re: deklaration unterscheidet sich von vorheriger ?!?!?
*lol* dann isses ja klar da im implementationsteil die TBitmapdeclaration aus Graphics genommen wird und im Declarationsteil die aus der Windowsunit
|
Re: deklaration unterscheidet sich von vorheriger ?!?!?
ja genau, ich tue mir selber auch schon leid. keine wunder, sitze seit 9 uhr am rechner und code.. :nerd:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 18:13 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