Subject Re: [IBO] How to tell if search criteria is being used
Author Andreas Pohl
Stan,

How about that:

procedure TForm.IB_UpdateBarButtonsStateChanged(Sender: TObject);
var sl:TStringList;
begin
sl:= TStringList.Create;
if (IB_UpdateBar.DataSource<>nil) then
if (IB_UpdateBar.DataSource.Dataset<>nil) then begin
with IB_UpdateBar.Dataset do begin
if active then WriteSearch(sl);
end;
end;
end;
if sl.text>'' then SowMessage('Yeap, there is a (manual) filter condition
applied.');
sl.free;
end;

BTW, this code is working even with FocusControl system of IBO.

Mit freundlichem Gruss & Best Regards
Andreas Pohl
ibp consult

----- Original Message -----
From: "stanw1950" <stanw@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, August 07, 2002 9:26 PM
Subject: [IBO] How to tell if search criteria is being used


> I have a tib_searchbar and am trying to make a shape visible if the
> tib_query has been filtered with the searchbar and not visible if
> there is no filter. The data displays in a tib_grid. I need the
> users to visually see if they have filtered the data or not. I can
> get the shape to appear in the datasource statechanged event by
> checking if the state is dssSearch, but I haven't figured out how to
> make it invisible if the search criteria is cancelled. What can I
> check to know if a search criteria has been applied? Thanks in
> advance. (D6Ent, IBO4.2.hg)
>