Subject Re: [IBO] TIB_LocateEdit bug ?
Author TeamIBO
> Another LocateEdit related question:
> Is it supposed to be also used to show/edit the underlying field
> value, like an ordinary IB_Edit control ?

**IF** you tie it to a particular field it will show and allow edit of
an underlying field. Indeed if you tie it to a particular field you
will not experience the problem described.


> It seems that now the control is read-only. It won't work any more,
> even if you close and reopen the dataset. You have to close the app
> and restart it.

I can see this happening when DataField is not assigned (and so
attaches to the OrderingField). I believe the fix for this would be
something like...

procedure TIB_LocateEdit.EditingChanged( Sender: TIB_DataLink;
IB_DataSource: TIB_DataSource );
begin
if (DataLink.State in [dssInsert,dssEdit,dssSearch]) then begin
if DisableEditing then
inherited ReadOnly := true
else inherited EditingChanged( Sender, IB_DataSource );
end
else
if (DataLink.State in [dssBrowse]) then begin
inherited ReadOnly := false
end;

I've not tested but I think that should work.

--
Geoff Worboys - TeamIBO
Telesis Computing