| Bug # | Delphi versions | Description |
| 21 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox TDBLookupCombo Style values csDropDown and csDropDownList override identical values of TComboBox/TDBComboBox/TDBLookupComboBox. Use StdCtrls.csDropDown and StdCtrls.csDropDownList to change the Style property at runtime. |
| 25 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox There is a bug in the write access methods of the SelStart and SelLength properties |
| 26 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox When setting the ItemIndex property, the combobox control is redrawn regardless of the new value. |
| 27 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox TComboBox (csDropDown) loses focus if Sorted is changed |
| 28 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox DropDownCount property does not work correctly in certain cases with owner drawn controls. |
| 384 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox Text replaced by matching item unexpectedly. |
| 529 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TComboBox It seems there is a bug in the TForm.Print function : if you print a form with comboboxes, the texts of the comboboxes are not printed. |
| 36 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TCustomListBox See TListBox |
| 42 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TEdit When using the read-only style, the control is not changed to have a gray background, like suggested in the Windows Interface Guidelines for Software Design by Microsoft, page 158. |
| 52 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TLabel TLabel.Alignment only works if TLabel.Layout = tlTop |
| 512 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TLabel TLabel does not show the correct background color after it is loaded if the color is clWindow |
| 53 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox If you select an item in a ListBox with MultiSelect set to False an index out of range error can occur |
| 54 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox TListBox.Items is declared as "TStrings" in the help file, however it is "TListboxStrings" which overrides, among other things, the Clear method of TStrings. |
| 55 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox Handle cannot be registered with DragAcceptFiles API function. |
| 56 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox General Protection Fault when ListBox is Freed while having focus. |
| 401 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox The help documentation for the ItemIndex property does not describe its lack of functionality with multiple-selection list box styles. |
| 433 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TListBox The ItemIndex property of TListBox does not work property. |
| 60 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMainMenu The TMainMenu of a main form will receive keyboard shortcuts even in the presence of another TMainMenu on an active child window. |
| 64 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMemo Invisible TMemo becomes visible when assigned text |
| 390 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMemo Adding strings with embedded Chr(0)'s in it gives inappropriate exception. |
| 525 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMemo TMemo.WordWrap fails to enable word wrapping if ScrollBars is set to ssBoth or ssHorizontal. |
| 527 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMemo TMemo is not grayed when its Enabled property is set to False |
| 12 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMenuItem There is a bug in Menus.pas (in IterateMenus). It produces GPFs but it's very unlikely that this one gives you trouble. |
| 65 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMenuItem MenuItems do not reflect changes to Caption, Visible, or Enabled properties.. |
| 516 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TMenuItem If you assign an image list to a TMainMenu, and the height of your imagelist is small compared to the height of your menu text, the text gets cramped together and some of the text actually gets chopped off. |
| 13 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TPopupMenu There's something wrong with multi-level popup menus having hint properties |
| 531 | 1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 |
TStringGrid There's a bug in TCustomGrid.InvalidateCol |
Bug #25; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
The reason for this erroneous behaviour seems to be a bug in the TCustomComboBox.SetSelStart and TCustomComboBox.SetSelLength methods in \DELPHI20\SOURCE\VCL\STDCTRLS.PAS for those that have the VCL source. I will not repeat the code here, but they send a CB_SETEDITSEL message to the control with wrong parameters in wParam and lParam.
According to my Win32 help file, the correct parameters are:
CB_SETEDITSEL (Win32) wParam = 0; /* not used, must be zero */ lParam = MAKELPARAM((ichStart), (ichEnd); /* start and end pos */"An application sends a CB_SETEDITSEL message to select characters in the edit control of a combo box."
Bug #26; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Var I: Integer;
...
With ComboBox1 do Begin
I := ItemIndex;
ItemIndex := I; { re-set to old value --> flicker }
End;
The above code sets the ItemIndex of the combobox to the same value it
already was. This causes the the control to be redrawn unnecessarily. This
can lead to performance problems, or at least unpleasant flicker especially
if the combobox items are "owner-drawn".
Problem location:
The STDCTRLS.PAS file in procedural method TCustomComboBox.SetItemIndex.
The code sends a CB_SETCURSEL message to the control without checking if
the item index has actually changed.
Var I : Integer;
...
With ComboBox1 do Begin
I := 123; { set to the new value }
If (I <> ItemIndex) Then { compare with old value }
ItemIndex := I; { if not equal, set property }
End;
Solution #2: If you want to avoid this problem in the future and you have
the VCL source code, you could modify STDCTRLS.PAS directly.
{
New version of SetItemIndex: this version checks to see
if the "new" value is actually different than the
previous one.
}
procedure TCustomComboBox.SetItemIndex(Value: Integer);
begin
if GetItemIndex <> Value then
SendMessage(Handle, CB_SETCURSEL, Value, 0);
end;
Bug #27; 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 |
The reason for this misbehaviour is that a TComboBox actually consists of two windows each having a handle but only if it has the style "csDropDown": the combobox itself and an associated edit control. When Delphi changes the Sorted property, it will test whether the combobox has focus, remember this, recreate the window and finally restore the window (TWinControl.RecreateWnd). Unfortunately the focus test code tests the combobox for being focused (which it is not) and not the associated edit control (which does have focus) (see TWinControl.Focused). Delphi thus comes to the conclusion that the combobox is not focused and, consequentially, does not transfer back the focus once the window has be recreated.
The reason that TComboBox.SetFocus fails is that Delphi internally never noticed that the active control ("FActiveControl") changed - the call to SetFocus is optimized away.
if ComboBox1.HasFocus {and (ComboBox1.Style = csDropDown)} then
begin
Form1.ActiveControl := nil; { or any other control }
RestoreFocus := true;
end else
RestoreFocus := false;
ComboBox1.Sorted := true;
if RestoreFocus then
ComboBox1.SetFocus;
b) Manually set the focus using the Windows API; this solves the problem
directly and is the preferred solution:
if ComboBox1.HasFocus {and (ComboBox1.Style = csDropDown)} then
RestoreFocus := true
else
RestoreFocus := false;
ComboBox1.Sorted := true;
if RestoreFocus then
WinProcs.SetFocus(ComboBox1.Handle);
Bug #28; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed |
The best way is to fix the VCL source code so that AdjustDropDown does the calculation properly using ItemHeight.
Bug #384; last modified: 13-Aug-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Unknown | Unknown | Unknown | Exists | Exists | Exists | Unknown |
It seems that whenever you change the font color, the contents of the text property are replaced by the first matching entry from items.
sText := Text;
nSelStart := SelStart;
nSelLen := SelLength;
Font.Color := nTextColor;
inherited Text := sText;
SelStart := nSelStart;
SelLength := nSelLen;
But this is kinda messy.
I'd be interested to see a cleaner workaround and would like to ask the Borland reps to fix this in Delphi 4?
Bug #42; last modified: 25-Oct-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Exists | Exists | Exists | Exists | Exists | Exists |
With Edit1 do Begin
ReadOnly := True; { set to read-only }
Color := clBtnFace; { indicate different behavior to user}
...
ReadOnly := False; { back to read-write }
Color := clWindow; { restore normal color }
End;
Bug #52; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | N/A | Exists | Unknown | Unknown | Unknown | Unknown | Unknown |
procedure TCustomLabel.Paint;
const
Alignments: array[TAlignment] of Word = (DT_LEFT, DT_RIGHT, DT_CENTER);
WordWraps: array[Boolean] of Word = (0, DT_WORDBREAK);
var
Rect: TRect;
TxtRect: TRect; // Add this!
DrawStyle: Integer;
begin
with Canvas do
begin
if not Transparent then
begin
Brush.Color := Self.Color;
Brush.Style := bsSolid;
FillRect(ClientRect);
end;
Brush.Style := bsClear;
Rect := ClientRect;
DrawStyle := DT_EXPANDTABS or WordWraps[FWordWrap] or
Alignments[FAlignment];
{ Calculate vertical layout }
if FLayout <> tlTop then
begin
// Modifications start here!
TxtRect := Rect;
DoDrawText(TxtRect, DrawStyle or DT_CALCRECT);
if FLayout = tlBottom then
OffsetRect(Rect, 0, Height - (TxtRect.Bottom - TxtRect.Top))
else
OffsetRect(Rect, 0, (Height - (TxtRect.Bottom - TxtRect.Top)) div 2);
// Modifications end here!
end;
DoDrawText(Rect, DrawStyle);
end;
end;
Bug #512; last modified: 20-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | N/A | Exists | Exists | Exists | Exists | Exists | Exists |
Bug #53; last modified: 13-Feb-99| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Exists | Exists | Unknown | Unknown | Unknown |
ListBox1.Items.Add('Now there is one item');
ListBox1.Selected[0] := True;
an index out of range error occurs.
Verification, edited description and workaround by Neil Booth:
This does indeed produce an exception on running, when ListBox1.MultiSelect
is False. A cure is to have ListBox1.MultiSelect set to True at the time
of setting Selected[0] to True. This is not very desirable as this involves
recreating the window and flicker.
The cause of the problem is that Selected[0] calls the VCL TCustomListBox.SetSelected, which posts an LB_SETSEL message to the list box. In the Windows help under LB_SETSEL, it states "Use this message only with multiple-selection list boxes."
Thus it is a bug in Delphi, as they do not state this limitation in Delphi's documentation.
procedure TCustomListBox.SetSelected(Index: Integer; Value: Boolean);
begin
if SendMessage(Handle, LB_SETSEL, Longint(Value), Index) = LB_ERR then
raise EListError.CreateFmt(SListIndexError, [Index]);
end;
with:
procedure TCustomListBox.SetSelected(Index: Integer; Value: Boolean);
begin
if (MultiSelect and
(SendMessage(Handle, LB_SETSEL, Longint(Value), Index) = LB_ERR))
or
(not MultiSelect and
(SendMessage(Handle, LB_SELECTSTRING, LongInt(Index),
LongInt(PChar(Items[Index]))) = LB_ERR))
then
raise EListError.CreateFmt(SListIndexError, [Index]);
end;
Bug #54; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
constructor TCustomListBox.Create(AOwner: TComponent); const ListBoxStyle = [csSetCaption, csDoubleClicks]; begin inherited Create(AOwner); ... FItems := TListBoxStrings.Create;So, although FItems is declared as TStrings, the Items are NOT TStrings but TListBoxStrings! And here is the Clear method of TListBoxStrings:
procedure TListBoxStrings.Clear; begin SendMessage(ListBox.Handle, LB_RESETCONTENT, 0, 0); end;Just a Windows message - could possibly work if items are inserted by the pointer method - as used in Win3.X when inserting large numbers of data into a Listbox but ....
Is this a bug or simply Bad documentation? I'd say this is a bug. And therefore it's placed here and not on the docs page - RS
with listbox1 do begin
while items.count>0 do begin
items.objects[items.count-1].free;
items.delete(items.count-1);
end;
end;
Bug #55; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed |
DragAcceptFiles(Edit1.Handle); DragAcceptFiles(Button1.Handle); DragAcceptFiles(ListBox1.Handle);Run the application and drag a file from File Manager over each of the controls. The cursor will indicate that it can be dropped on the button and edit controls, but not on the listbox. Note for PCTools for Windows users: It will appear as if the file can be dropped on the listbox, but doing so actually passes the dropped file on to the desktop window, creating a new icon on it. Very strange indeed.
Bug #56; last modified: 25-Oct-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Unknown | Unknown | Unknown | Fixed | Fixed |
Bug #401; last modified: 29-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Exists | Exists | Exists | Exists | Exists | Exists |
procedure TForm1.FormCreate(Sender: TObject);
var
I: Integer;
begin
{ populate both list boxes }
for I := 0 to 9 do ListBox1.Items.Add(Format('%d', [I]));
ListBox2.Items.Assign(ListBox1.Items);
{ set ItemIndex and Selected properties }
ListBox1.ItemIndex := 2;
ListBox2.Selected[2] := True;
end;
This limitation is not documented.
One would expect the ItemIndex list box
properties to be settable independent of whether or not the list box is
MultiSelect.
Cause:
The VCL code (STDCTRLS.PAS) for TCustomListBox and its TListBox descendant is
not written to overcome the lack of functionality for the Windows 3.1 API
(LB_SETCURSEL and LB_SETSEL messages) affecting the ItemIndex and Selected list
box properties and their associated methods for multiple-selection and
single-selection styles respectively.
When the Selected property is used on a single-select list box, LB_ERR is returned as the result of the LB_SETSEL windows message; this causes the exception to be raised (in the TCustomListBox.SetSelection method).
Windows 3.1 API specifies that the LB_SETCURSEL message (used to set the ItemIndex property) has no effect on multiple-selection list boxes and that the LB_SETSEL message (used to set the Selected property) delivers LB_ERR as the result. These limitations have not been carried through to the ItemIndex and Selected documentation.
Bug #433; last modified: 13-Aug-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Absent | Absent | Absent | Absent | Absent | Exists | Fixed | Fixed |
ListBox1.ItemIndex := -1;In the second button's OnClick handler, add this:
ShowMessage(IntToStr(Listbox1.ItemIndex));Run the app. Select an item in the listbox. Click button 1. Notice that the selection remains, even though ItemIndex := -1 should clear it. Click the second button. Notice that it reports -1 even though a selection still exists in the listbox.
Also with MultiSelect = FALSE, the behaviour is not what you would expect: If an item is selected and you press Button1, the selection disappears, but if you then press Button2, it reports a value >=0 for ItemIndex.
The cause of this second problem lies in the D4 Implementation of GetItemIndex:
function TCustomListBox.GetItemIndex: Integer;
begin
if not MultiSelect then
Result := SendMessage(Handle, LB_GETCARETINDEX, 0, 0) else
Result := SendMessage(Handle, LB_GETCURSEL, 0, 0);
end;
D3:
function TCustomListBox.GetItemIndex: Integer;
begin
Result := SendMessage(Handle, LB_GETCURSEL, 0, 0);
end;
And the D4 implementation is obviously not correct.
#2) Create a descendant of TListBox and replace the ItemIndex property completely, supplying your own read and write methods with the above fixed code. The write method is correct, so it can simply be copied from the existing VCL source.
#3) Don't use the ItemIndex property. Instead use the LB_GETCARETINDEX/LB_SETCARETINDEX messages directly with SendMessage for multiselect listboxes, and LB_GETCURSEL/LB_SETCURSEL messages with non-multiselect listboxes.
Bug #60; 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 |
function TMainForm.AppKeyDownHook(var Msg: TMessage): Boolean;
begin
case Msg.Msg of
Cm_AppkeyDown:
Result := True; { test here whether to act locally }
Cm_AppSysCommand:
Result := True; { test here whether to act locally }
else
Result := False; { event will go to the parent's main menu }
end;
end;
procedure TMainForm.FormCreate(Sender: TObject);
begin
Application.HookMainWindow(AppKeyDownHook)
end;
Bug #64; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed |
procedure TForm1.Button1Click(Sender: TObject); begin Memo1.Lines.Assign(Memo2.Lines); end;
procedure TMemoStrings.SetUpdateState(Updating: Boolean);
begin
{$IFDEF FixAppearingMemoBug}
if Memo.HandleAllocated then
begin
{$ENDIF}
SendMessage(Memo.Handle, WM_SETREDRAW, Ord(not Updating), 0);
if not Updating then
{ WM_SETREDRAW causes visibility side effects in memo controls }
begin
{$IFDEF FixAppearingMemoBug}
{ This reasserts the visibility we want }
Memo.Perform(CM_SHOWINGCHANGED,0,0);
{$ENDIF}
Memo.Refresh;
end;
{$IFDEF FixAppearingMemoBug}
end;
{$ENDIF}
end;
There appears (ha ha - Neil) to be no work-around.
Bug #390; last modified: 13-Apr-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed |
procedure TForm1.FormShow(Sender: TObject);
begin
Memo1.Lines.Add('Here is a null char >' + Chr(0) + '<')
end;
Although the message of the exception *is* appropriate, the type of the exception is not.
The expected behaviour would be:
Any one of the following:
a) Embedded null characters translated to other characters, e.g. blanks, and
the result inserted/added into the memo; or
b) Embedded null characters eliminated from the string and the result inserted/
added into the memo; or
c) The string up to the first null character inserted/added to the memo
This is what actually happens in Delphi 2 and Delphi 3, RPS; or
d) An exception indicating the presence of a null character in the Pascal string
parameter.
What one should/could expect is not described in the documentation.
if Memo.SelStart <> (Selection.EndPos + Length (S) + 2) then
raise EOutOfResources.Create(LoadStr(SInsertLineError));
to
if Memo.SelStart <> (Selection.EndPos + StrLen(Text)) then
raise EOutOfResources.Create(LoadStr(SInsertLineError));
Bug #525; last modified: 19-Jan-99| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Gotcha |
Bug #527; last modified: 7-Feb-99| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed | Fixed |
The Delphi 1 online help on the Enabled Property states that 'Disabled controls appear dimmed'. (The version of Delphi is 1.02, running on Windows 3.1 and Windows for WorkGroups 3.11, both with Win32s.)
To reproduce:
Bug 2, 3: TEdit and TComboBox will be greyed only if they are made
visible and then changed from enabled to disabled. Note that 'made
visible' means that their Visible property and the Visible properties
of all their parent controls are True.
Workaround: if, when these controls first become visible,
they are in the disabled state, set their Enabled properties to True and then
immediately back to False.
Bug #12; last modified: 27-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | N/A | N/A | N/A | N/A | N/A | N/A | N/A |
Bug #65; last modified: 11-Jul-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Exists | Exists | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown |
Code snippet. The changes to Top-level menus do not show; the changes to lower level menus do show. All menu items are owned by the MDI child.
Procedure AdjustMenus;
begin {AdjustMenus}
if sType = sDNA then begin
MnDNA.Enabled := TRUE; {top level - WILL NOT SHOW}
MnParse.Enabled := TRUE; {lower level - works}
MnAddORFs.Enabled := TRUE; {lower level - works}
MnProtein.Enabled := FALSE; {top level - WILL NOT SHOW}
end else begin
MnDNA.Enabled := FALSE; {top level - WILL NOT SHOW}
MnParse.Enabled := FALSE; {lower level - works}
MnAddORFs.Enabled := FALSE; {lower level - works}
MnProtein.Enabled := TRUE; {top level - WILL NOT SHOW}
end; {else}
end; {AdjustMenus}
Bug #516; last modified: 20-Dec-98| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| N/A | N/A | N/A | N/A | N/A | Exists | Exists | Exists |
To reproduce, create an imagelist with dimension 16x16 or so. In Windows Control panel, use Large Font display, and set menu text to MS Sans Serif 10. You will see your D4 menus with bitmaps are cramped vertically, compared to regular menus.
Bug #13; last modified: before April 1998| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Unknown | Exists | Unknown | Unknown | Unknown | Unknown | Unknown |
Comment from checker:
I was able to reproduce this problem. IMHO this is a bug...
Bug #531; last modified: 9-Feb-99| 1.02 | 2.01 | 3.0 | 3.01 | 3.02 | 4.0 | 4.01 | 4.02 |
| Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Exists |
procedure TCustomGrid.InvalidateCol(ACol: Longint); var Rect: TGridRect; begin if not HandleAllocated then Exit; Rect.Top := TopRow; Rect.Left := ACol; Rect.Bottom := TopRow+VisibleRowCount; Rect.Right := ACol; InvalidateRect(Rect); end;This is the original D4.02 code:
procedure TCustomGrid.InvalidateCol(ACol: Longint); var Rect: TGridRect; begin if not HandleAllocated then Exit; Rect.Top := 0; Rect.Left := ACol; Rect.Bottom := VisibleRowCount+1; Rect.Right := ACol; InvalidateRect(Rect); end;I have a grid that needs to have dynamic content in the topmost cell. When the user scrolls upwards, the entire left column needs to be repainted (actually, it would suffice to only paint the uppermost cells, but TCustomGrid doesn't bother surfacing InvalidateRect from its private section).