Subject Re: Problem with Searchpanel : wrong taborder of searchfields
Author Marco Menardi
mmm... I don't use this component, but I've done some experiment for
you (using LookupCombo sample as a base).
Here it works! (Ibo 4.2Ia, D6pro, Win2k)
This is the code associated to 3 buttons, and I call them in sequence
and test the tab order:

procedure TfrmLkCmb.Button2Click(Sender: TObject);
begin
with IB_SearchPanel1.GridLinks do
begin
Clear;
Add('FIRST_NAME');
Add('LAST_NAME');
Add('JOB_CODE');
end;
end;

procedure TfrmLkCmb.Button3Click(Sender: TObject);
begin
with IB_SearchPanel1.GridLinks do
begin
Clear;
Add('LAST_NAME');
Add('FIRST_NAME');
Add('JOB_CODE');
end;
end;

procedure TfrmLkCmb.Button4Click(Sender: TObject);
begin
IB_SearchPanel1.GridLinks[0] := 'FIRST_NAME';
IB_SearchPanel1.GridLinks[1] := 'JOB_CODE';
IB_SearchPanel1.GridLinks[2] := 'LAST_NAME';
end;

After each button click, I select the first field of the searchpanel
and then press tab. The tab order is always as expected for the
subsequent 2 fields.
The thing that surprised me was that Button4Click code works without
having to call the StringsChanged(nil) method, that shoudl perform a
"refresh" of the panel.
What code are you using?
regards
Marco Menardi

--- In IBObjects@y..., "Werner Hofmann" <hofmann_werner@t...> wrote:
> Hello,
> i have another problem using the searchpanel. If i change the
Searchfields
> with the searchpanel.gridlinks property and reorder some fields in this
> list - the taborder of the searchpanel is in the old order of the
fields.
> Is it possible to change this behavior. I know i can reorder the
fields in
> the query - but i want let the user decide which fields in which
order he
> want search with.
>
> Using Delphi 7E, IBO 4.2I
>
> --
> Werner Hofmann