| Bug # | Delphi versions | Description |
| 41 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TDirectoryListbox TDirectoryListBox has problems when an active directory becomes invalid (e.g. after renaming, or removing a diskette). |
| 402 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TFileListBox If TFileListBox MultiSelect=True, the ApplyFilePath method sets FileMask to the selected file name, preventing the display of other files in the directory. |
| 43 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TFileListbox When the 'current drive' becomes invalid (e.g. after renaming or removing diskette), it becomes impossible to choose a different drive |
| 69 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TOutline TCustomItem.DrawCell passes wrong index to (F)OnDrawItem |
| 70 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TOutline TOutline.OnDrawItem passes incorrect index. |
| 71 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TOutline TOutline: Horizontal scrolling and resizing not correct. |
| 92 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TTabbedNotebook Tab controls does not respond if application does not have focus. |
| 510 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TTabbedNotebook TTabbedNotebook duplicates its pages as a response to RecreateWnd |
Bug #41; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Unknown | Unknown | Unknown | Unknown | Unknown |
Comment from checker:
I can confirm this bug. It still exists in Delphi 3 (build 5.53).
The culprit is the TFileListBox.SetDirectory method in the FileCtrl
unit:
procedure TFileListBox.SetDirectory(const NewDirectory: string);
begin
if AnsiCompareFileName(NewDirectory, FDirectory) <> 0 then
begin
{ go to old directory first, in case not complete pathname
and curdir changed - probably not necessary }
ChDir(FDirectory);
ChDir(NewDirectory); { exception raised if invalid dir }
GetDir(0, FDirectory); { store correct directory name }
ReadFileNames;
end;
end;
The first ChDir with FDirectory as the argument changes the current
directory back to the old directory before changing it to the new
directory. Note from the Borland comments that they had doubts about
this as well...
Bug #402; last modified: 12-May-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
procedure TForm1.FormCreate(Sender: TObject);
var
WinDirBuff: array[0..255] of Char;
WinDirString: String;
DirLen: Word;
begin
DirLen := GetWindowsDirectory(@WinDirBuff, SizeOf(WinDirBuff));
if DirLen > 0 then
begin
WinDirString := StrPas(WinDirBuff);
if WinDirString[Length(WinDirString)] <> '\' then
WinDirString := WinDirString + '\';
FileListBox1.ApplyFilePath(WinDirString + 'win.ini');
FileListBox2.ApplyFilePath(WinDirString + 'win.ini')
end
else ShowMessage('Windows directory error')
end;
No difference is documented in the help topic for the ApplyFilePath method (and no difference would be expected). ApplyFilePath is documented as enabling a Open dialog to be approximated. The Windows Open dialog (GetOpenFileName) behaves sensibly when OFN_ALLOWMULTISELECT is set.
Cause:
The ApplyFilePath method in FileCtrl.pas calls the SetFileName method and
SetFileName sets ItemIndex (twice). ItemIndex is a TCustomListBox property in
StdCtrls.pas using the Windows LB_SETCURSEL message which has no effect for a
multiple-selection list box and is documented thus in the Windows API
documentation.
ItemIndex := -1;to
if MultiSelect then Selected[-1] := False else ItemIndex := -1;and change
ItemIndex := Itemto
if MultiSelect then Selected[Item] := True else ItemIndex := Item;
Bug #69; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Exists | Exists | Exists | Exists | Unknown | Unknown | Unknown |
Original: OUTLINE.PAS (delphi 3.0 (maybe also in 2.0))
----line 2147 (or near this line)
if (Style = otOwnerDraw) and Assigned(FOnDrawItem) then
begin
if Row = ARow then
begin
if GetFocus = Self.Handle then
begin
FOnDrawItem(Self, ARow, ARect, [odFocused, odSelected]);
^^^^^
if ooDrawFocusRect in Options then
DrawFocusRect(Canvas.Handle, ARect);
end
else FOnDrawItem(Self, ARow, ARect, [odSelected])
^^^^^
end
else OnDrawItem(Self, ARow, ARect, []);
^^^^^
Exit;
end;
Correction: OUTLINE.PAS (delphi 3.0 (maybe also in 2.0))
if (Style = otOwnerDraw) and Assigned(FOnDrawItem) then
begin
Node := GetVisibleNode(ARow);
^^^^^^^^^^^^^^^^^^^^^^^^^^^
if Row = ARow then
begin
if GetFocus = Self.Handle then
begin
FOnDrawItem(Self, Node.Index, ARect, [odFocused, odSelected]);
^^^^^^^^^
if ooDrawFocusRect in Options then
DrawFocusRect(Canvas.Handle, ARect);
end
else FOnDrawItem(Self, Node.Index, ARect, [odSelected])
^^^^^^^^^
end
else OnDrawItem(Self, Node.Index, ARect, []);
^^^^^^^^^
Exit;
end;
Bug #70; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
procedure OutlineCorrectIndex(Outline: TOutline; var Index: longint): longint;
var
x, visible: longint;
begin
inc(Index); { Adjust for 1 based, not 0 based }
Visible := 0;
x := 1;
while (Visible < Index) and (x <= Outline.ItemCount)
do begin
if Outline.Items[x].IsVisible
then begin
inc(Visible);
if Visible = Index
then begin
Index := x;
break;
end;
end;
inc(x);
end;
end;
Bug #71; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Create a new project, put a TOutline on the form.
Set the following properties:
Align: alClient;
Scrollbars: ssHorizontal (or ssBoth)
Enter a LOOOONG line into the editor.
Resize the form so that it's width is rather small.
You will notice that a horizontal scrollbar has appeared. Now move
the thumb to the right end of the scrollbar.
Increase the form's width (that is to increase the width of the TOutline).
You will notice that what you expected to be drawn on the left side now
is drawn on the right side of the box, eg: If the line you entered was
abcdefghiklmnopqrs then you now might see
and before resizing and after horizontal scrolling you will see
after resizing you might see:
In that file you fill find some more details and as well the source patches that have to be applied to the 1.01 source to fix the problem.
NOTE: There may be problems with Delphi 1.02 and this bugfix.
Bug #92; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Bug #510; last modified: 9-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Exists | Exists | Exists | Exists | Exists | Exists | Exists |