[fpc-devel] Purpose of AutoEdit property of StringGrid

Jesus Reyes A. jesusrmx at gmail.com
Sun Jul 17 20:33:28 CEST 2016


En Sun, 17 Jul 2016 12:13:58 -0500, Чернов Дмитрий <blackdoomer at yandex.ru>  
escribió:

> Hi again.
>Recently I've played around the StringGrids and noticed one weird thing.
> There are two quite similar properties:
> AutoEdit
> description: Whether the Edit mode is automatically entered when a cell  
> is selected
> Options/goAlwaysShowEditor
> description: Always show editor. If not set, the user has to enter the  
> edit mode by pressing >some character key or F2 key.
> And here comes the question: what's the difference between them?
> I've also noticed that goAlwaysShowEditor=True overrides behavior of  
> AutoEdit=False.
> Anyway thanks.
> _____
> Dmitry D. Chernov

Both options work only when goEditing option is true.

If the goAlwaysShowEditor option is true, yes, the editor will be always  
visible, if it is false, the editor is not always visible. You have may  
not noticed that the editor is visible, change the grid color to something  
different than the default, then it will be obvious.

If the editor is not always visible and you do a click in a cell that is  
not selected, the cell becomes focused. If you do a second click AND  
AutoEdit=true, then the editor becomes visible, I guess is called AutoEdit  
because you don't have to use the keyboard in order to show the editor. In  
other words, the AutoEdit works with mouse clicks, it seems from the  
description that you quoted that the description needs an update.

Jesus Reyes A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20160717/33483ce6/attachment.html>


More information about the fpc-devel mailing list