Recent

Author Topic: TStringGrid possible bug report  (Read 257 times)

MISV

  • Hero Member
  • *****
  • Posts: 618
TStringGrid possible bug report
« on: August 17, 2019, 11:44:08 pm »
From
https://wiki.lazarus.freepascal.org/Grids_Reference_Page

Quote
cbsEllipsis
This editor style is the most generic one. When used, a button appears in the editing cell and programmers could use the OnEditButtonClick grid event to detect when the user has pressed the button and take any action programmed for such a cell. For example a programmer could use this editor style to pop up a calendar dialog to allow the user easily to select a specific date. Other possibilities could be to show a file open dialog to find files, a calculator so user can enter the numeric result of calcs, etc.
OnEditButtonClick is just a notification, to find out in which cell a button has been clicked by taking a look at the grid.Row and grid.Col properties.

On Mac/Cocoa

However - using this I get no ellipsis nor does OnEditButtonClick fire... when the column is set to ReadOnly

I have cbsPicklist and cbsButtonColumn working... But I really need the look of picklist (i.e. an ellipsis) with readonly set to true...

I e.g. have a grid with lots of paths listed. I would like the ellipsis, so people can click it to have e.g. browser open.


MISV

  • Hero Member
  • *****
  • Posts: 618
Re: TStringGrid possible bug report
« Reply #1 on: August 20, 2019, 09:21:31 pm »
Would just be curious to know if people agree it is most likely a bug... or if I should submit it as a feature request

jamie

  • Hero Member
  • *****
  • Posts: 1901
Re: TStringGrid possible bug report
« Reply #2 on: August 20, 2019, 10:57:06 pm »
It must be a widget bug.

I would report it.

lucamar

  • Hero Member
  • *****
  • Posts: 1991
Re: TStringGrid possible bug report
« Reply #3 on: August 20, 2019, 11:34:17 pm »
I'm not so sure it's a bug. If the column is read-only it shouldn't be user-editable, should it?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

jamie

  • Hero Member
  • *****
  • Posts: 1901
Re: TStringGrid possible bug report
« Reply #4 on: August 21, 2019, 12:47:20 am »
at least the ellipse should work.

lucamar

  • Hero Member
  • *****
  • Posts: 1991
Re: TStringGrid possible bug report
« Reply #5 on: August 21, 2019, 12:55:45 am »
at least the ellipse should work.

No, because the ellipsis button is the UI control to access the editor.

If it shows the field's content, that should be enough.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.