Lazarus

Programming => LCL => Topic started by: MISV on August 17, 2019, 11:44:08 pm

Title: TStringGrid possible bug report
Post by: MISV 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.

Title: Re: TStringGrid possible bug report
Post by: MISV 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
Title: Re: TStringGrid possible bug report
Post by: jamie on August 20, 2019, 10:57:06 pm
It must be a widget bug.

I would report it.
Title: Re: TStringGrid possible bug report
Post by: lucamar 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?
Title: Re: TStringGrid possible bug report
Post by: jamie on August 21, 2019, 12:47:20 am
at least the ellipse should work.
Title: Re: TStringGrid possible bug report
Post by: lucamar 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.
TinyPortal © 2005-2018