Subject Re: [IBO] TIB_Grid InPlaceEditor Logic
Author Russell Belding
"Geoff Worboys (TeamIBO)" <geoff@...> wrote in message
> Russell,
> > I set up a test table with an integer ID columne and three memo text
> > columns. The IB_Grid for this table has no event handler for
> > OnEditButtonClick. It should use the default memo editor and I'd
> > prefer to use the default text editor, (but my own date editor as I
> > have date calculations using a table of non-working days which is
> > set for local law).
> You mean that you would prefer to edit the memo inline like normal
> text? What about carriage returns and scrollbars etc? (BTW it is
> possible to edit a memo inline by dropping TIB_MemoEnh onto the grid -
> from my EnhComponents.)

Like the multiline memo editor which pops up. I will try your Enh

> > In the code I have if gnOnEditDoEditClick=True and
> > AlwaysShowEditor=True then entering a memo cell causes cycling
> > somewhere as evidenced by the cell text flicker.
I tried it again and it does not now happen. A Puzzle.

> I just tried to simulate this here, and I am getting what I expect.
> That is; When I land on a memo cell the memo editor automatically
> displays. When I OK out of the memo editor it automatically jumps to
> the next cell (and if that is a memo then the memo editor shows
> again).

Yes I get this here also. The action is not to my liking. I'd prefer to use
gnOnEditDoEditClick=false. In a contiguous set of fields in a row the only
way to break out of editing is to land on a non-textBlob field. My users
are office workers and from experience I'd guess an action like this will
not be wanted. It would be great for entering fresh data but not for random

> > There is no column level control over what columns can be edited? Do
> > I need an OnEditButtonClick handler for this?
> The code is...
> if Assigned( FOnEditButtonClick ) then
> FOnEditButtonClick( Self )
> else
> if ( FEditLinksAuto and SelectedField.IsText ) then
> ShowMemoEditor;
> So if you define an OnEditButton click event then the memo editor will
> not be automatically displayed. However the ShowMemoEditor function
> is public to IB_Grid, so you can easily call that function for
> particular fields. (This seemed like the most flexible option at the
> time.)
> 1. NavigateOptions := [gnOnEditDoEditClick]
> 2. EditLinksAuto := true
> 3. EditLinks := blank
> 4. AlwaysShowEditor := true
Thanks, I reproduced your setup with this.

My preference is now
1. NavigateOptions := []
> 2. EditLinksAuto := true
> 3. EditLinks := blank
> 4. AlwaysShowEditor := true

and in special cases have column level control over the editor chosen for
that column.