Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-05

TStringGrid sort symbol in TitleButton

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Landmesser John

In a StringGrid without(!) defined columns you never see that up and down arrow in the TitleButton if you click to sort this column.

It's ok if you define at least one column, but i think that shouldn't be this way.

Attached patch comments out

//FImageIndex := -1;

My first patch :-)

Lazarus 1.9.0 r57932M FPC 3.0.4 i386-win32-win32/win64

-------------- next part --------------
Index: lcl/grids.pas
===================================================================
--- lcl/grids.pas	(Revision 57932)
+++ lcl/grids.pas	(Arbeitskopie)
@@ -11858,7 +11858,7 @@
   FFont := TFont.Create;
   FillTitleDefaultFont;
   FFont.OnChange := @FontChanged;
-  FImageIndex := -1;
+  //FImageIndex := -1;
   FImageLayout := blGlyphRight;
   FIsDefaultCaption := true;
 end;

Reply by email

Landmesser John
to Landmesser John

forget the patch, it doesn't solve the problem!

Landmesser John wrote 16 lines
In a StringGrid without(!) defined columns you never see that up and down arrow in the TitleButton if you click to sort this column. It's ok if you define at least one column, but i think that shouldn't be this way. Attached patch comments out //FImageIndex := -1; My first patch :-) Lazarus 1.9.0 r57932M FPC 3.0.4 i386-win32-win32/win64

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20180514/0fe524f5/attachment.html>

Reply by email

zeljko
to Landmesser John: In a StringGrid without(!) defined columns you never see that up and down arrow in the…
Landmesser John wrote 5 lines
In a StringGrid without(!) defined columns you never see that up and down arrow in the TitleButton if you click to sort this column. It's ok if you define at least one column, but i think that shouldn't be this way.

I don't get what is exact problem. If there's no columns why Sort indicator should be visible at all (and where) ?
In any case you can create bug report and attach example project.

zeljko

Show quoted text 11 lines
Attached patch comments out //FImageIndex := -1; My first patch :-) Lazarus 1.9.0 r57932M FPC 3.0.4 i386-win32-win32/win64

Reply by email

John Landmesser
to zeljko

Hi Zeljko,

think of a *.csv file and StringGrid.LoadFromCSV...

No columns defined in StringGrid, they will be created "on the fly" and user wants to sort a column by click on columnTitle.

There are default arrows that only show up if you define at least one column and thats not ok i think!

Bug report:
https://bugs.freepascal.org/view.php?id=33731

zeljko wrote 25 lines
On 05/14/2018 01:43 PM, Landmesser John via Lazarus wrote: > In a StringGrid without(!) defined columns you never see that up and > down arrow in the TitleButton if you click to sort this column. > > It's ok if you define at least one column, but i think that shouldn't > be this way. I don't get what is exact problem. If there's no columns why Sort indicator should be visible at all (and where) ? In any case you can create bug report and attach example project. zeljko > > Attached patch comments out > > //FImageIndex := -1; > > My first patch :-) > > Lazarus 1.9.0 r57932M FPC 3.0.4 i386-win32-win32/win64 > > >

Reply by email