Subject | Re: [IBO] TIB_Grid InPlaceEditor Logic |
---|---|
Author | Geoff Worboys |
Post date | 2002-01-05T22:25:17Z |
> The looping problem here is caused when AlwaysShowEditor=True.Well its that and the fact that you have the navigate option
gnOnEditDoEditClick turned on (from when you were using
FEditLinkAutoClicked stuff).
That is; gnOnEditDoEditClick simulates a click of the editor button
when the cell editor control receives focus. When AlwaysShowEditor is
true then the cell editor control receives focus as soon as the cell
is selected. When your OnEditButton handler shows a dialog the cell
loses focus while the dialog is displayed - and then receives focus
again then the dialog returns.
I also tend to turn AlwaysShowEditor on in any grid used to serious
editing - it can be extremely frustrating always having to hit F2.
The problem you experience with AlwaysShowEditor and
gnOnEditDoEditClick I also experienced with the memo editor in the
grid. If you look at the code for
procedure TIB_CustomGrid.ShowMemoEditor;
you will see the additional lengths that were required to handle the
situation.
In the short term you have only two choices...
1. Disable gnOnEditDoEditClick
2. Create your own derivation of IB_Grid and override EditButtonClick
to do something similar to ShowMemoEditor when your function is
called.
In the longer term I may be able to alter EditButtonClick so that it
avoids this problem - by moving the specialised code from
ShowMemoEditor to EditButtonClick. But I suspect that that will take
some experimenting to get right.
hth
--
Geoff Worboys
Telesis Computing