View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002121 | JEDI VCL | 00 JVCL Components | public | 2004-09-05 04:31 | 2005-04-12 09:41 |
Reporter | mschumann | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 BETA | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002121: jvThumbViews onGetTitle doesnt always get called | ||||
Description | I extended jvThumbViews to call the event OnGetTitle also with Files read from a directory. This allows changing all Titles not only those of pics added manually. IMO this is the correct behaviour - the event GetTitle should be called with every thumbnail. | ||||
Additional Information | Here are the proposed changes (marked with // *** added by micha schumann): procedure TJvThumbView.SetDirectory(Value: string); var Counter1, FStartTime: DWORD; Cancel: Boolean; ReadFileList: TStringList; OldCursor: TCursor; // *** added by micha schumann // *** allow to change title also with scanned files FFont: TFont; FColor: TColor; ThumbnailTitle: string; // *** end addition by micha schumann // Pic: TPicture; begin FSelected := -1; // If Not FPainted then // begin // postMessage(Self.Handle,WM_LoadWhenReady,0,0); // Exit; // end; FDiskSize := 0; if FFilling then Exit; if Value <> '' then begin ReadFileList := TStringList.Create; OldCursor := Cursor; try FFilling := True; // if Assigned(ReadFileList) then FreeAndNil(ReadFileList); FStartTime := GetTickCount; GetFiles(Value); if FSorted then ReadFileList.Assign(FFileListSorted) else ReadFileList.Assign(FFileList); EmptyList; FDirectory := Value; if Assigned(FOnStartScanning) then FOnStartScanning(Self, ReadFileList.Count - 1); if ReadFileList.Count > 0 then begin Cancel := False; for Counter1 := 0 to ReadFileList.Count - 1 do begin if Assigned(FOnScanProgress) then FOnScanProgress(Self, Counter1 + 1, Cancel); if Cancel then Break; AddThumb(ExtractFilename(ReadFileList.Strings[Counter1]), True); TJvThumbnail(FThumbList.Objects[Counter1]).FileName := ReadFileList.Strings[Counter1]; // *** added by micha schumann // *** allow to change title also with scanned files if Assigned(FOnGetTitle) then begin FFont := TFont.Create; FColor := clBtnFace; FOnGetTitle(Self, ReadFileList.Strings[Counter1], ThumbnailTitle, FFont, FColor); TJvThumbnail(FThumbList.Objects[Counter1]).SetTitlePanel(ThumbnailTitle, FFont, FColor); FreeAndNil(FFont); end; // *** end addition by micha schumann Inc(FDiskSize, TJvThumbnail(FThumbList.Objects[Counter1]).FileSize); if (Cursor <> crHourGlass) and (GetTickCount - FStartTime > 1000) then Cursor := crHourGlass; end; end; if Assigned(FOnStopScanning) then FOnStopScanning(Self); finally FreeAndNil(ReadFileList); FFilling := False; Cursor := OldCursor; end end else EmptyList; FDirectory := Value; if (FThumbList.Count > 0) and (Selected < 0) then SetSelected(0); Invalidate; end; | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2004-09-05 04:31 | mschumann | New Issue | |
2005-04-12 08:43 | obones | Note Added: 0006970 | |
2005-04-12 08:43 | obones | Status | new => feedback |
2005-04-12 09:35 | mschumann | Note Added: 0006978 | |
2005-04-12 09:41 | obones | Status | feedback => resolved |
2005-04-12 09:41 | obones | Resolution | open => fixed |
2005-04-12 09:41 | obones | Assigned To | => obones |