[Lazarus] How to avoid of closing my application when unhandled exception in shared library appers

Roland Turcan konf at rotursoft.sk
Thu Feb 4 16:43:48 CET 2010


Michael Van Canneyt wrote:
> 
> 0,0 normally is the top left cell, even with fixed row/column.

That's what I thought too, but it didn't work like that when I created the
"File Filters" screen. Below is the code I used...

Note I set RowCount = 1, which to me meant that the fixed row is now
visible. When I set grdFileFilters.Columns[0].Title.Caption := '', it
actually sets cell (1,0), the second column, to blank text.

So it seems Cell() and Columns() are inconsistent in meaning (column 0 not
being the same thing) - or I simply don't know how to use the TStringGrid
(which is probably true as well).

----------------------
procedure TFileFiltersOptionsFrame.Setup(ADialog:
TAbstractOptionsEditorDialog);
begin
  lblTitle.Caption := lisFileFiltersTitle;
  grdFileFilters.DefaultColWidth := 40;
  grdFileFilters.RowCount := 1;

  grdFileFilters.Columns[0].Title.Caption := lisFileFiltersName;
  grdFileFilters.Columns[1].Title.Caption := lisFileFiltersMask;
...
----------------------------



> Maybe the row-numbers option changes that. Try doing the row-numbering yourself.

Jesus knows the StringGrid pretty well, so I'll wait a bit to see what he
says. Otherwise I'll simply paint the fixed column (row numbers) myself -
as you suggested.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net/fpgui/





More information about the Lazarus mailing list