Bugs in DbGrid with Lazarus 0.9.30
Original Reporter info from Mantis: CortelliStefano
-
Reporter name: Stefano
Original Reporter info from Mantis: CortelliStefano
- Reporter name: Stefano
Description:
Hello, I've installed Lazarus 0.9.30 and I finded problems with DbGrid. With Lazarus 0.9.28 all worked very good.
-
Grid columns with ScrollBars = ssVertical and AutoFillColumns = True have problems, when the Grid is complex with settings columns Visibile or not visible or columns width at runtime. In some cases the last columns of the grid hat width minor, the difference is = width scrollbar. With ScrollBar = ssAutoVertical is ok.
-
Non visible columns have always Width = 0. With Lazarus 0.9.28 I can set Width all columns, and when I set a columns visible = True, the columns hat already the desired Width.
-
If 1. columns is not visible the Key Home doesn't work (may be auch last column if not visible with End Key, I have not tried).
-
When I write oder modify data (edit state) in last column of the grid, the grid lost focus when I exit the edit state with Key Arrow Right or Tab. Here is my code in KeyDown event:
if (dbgrid3.SelectedIndex = dbgrid3.Columns.Count - 1) and (Key in [KeyTab, KeyArrowRight]) then begin
dbgrid3.SelectedIndex := 0;
Key := 0;
fbdataset4.Next;
if (fbdataset4.EOF = True) then fbdataset4.Append;
//Lazarus 0.9.30
try
dbgrid3.SetFocus;
finally
end;
end;
Without dbgrid3.SetFocus the grid lost focus.
At end event KeyDown I added however this code with Lazarus 0.9.30, else can lost focus:
if Key in [KeyHome, KeyEnd, KeyPgUp, KeyPgDown, KeyArrowUp, KeyArrowDown, KeyArrowLeft, KeyArrowRight] then begin
//Calcolo dati griglia
if (fbdataset4.State in [dsEdit, dsInsert]) then fbdataset4.Post; //Altrimenti spostandosi con freccia dx sul primo riga perde il dato della colonna 0
if (B = False) then begin
//Focus rimasto su griglia contabile
try
dbgrid3.SetFocus;
finally
end;
end;
end;
- In some other cases I noted that the grid lost focus, while with Lazarus 0.9.28 all worked good. Now is difficult for me to reproduce these cases.
Sorry for my bad englisch.
Best regards,
Stefano Cortelli
Additional information:
Debian Squeeze - GTK 2 - Lazarus 0.9.30 stable