<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > RYOFilterSetBit |
Declaration
function RYOFilterSetBit( iFilterHandle : Integer;
lRecNo : LongInt;
iOnOrOff : Integer ) : WordBool;
Description
Sets or resets a bit corresponding to the table record represented by lRecNo.
Parameters
iFilterHandle: An integer identifier of the bitmap returned from either RYOFilterCopy or RYOFilterCreate. If this parameter is passed as zero, the active bitmap is acted upon.
lRecNo: The number of the bit to be set or reset. This number represents the physical location of the table record.
iOnOrOff: If TRUE, the bit is set and the record becomes visible. If FALSE, the bit is reset and is no longer visible when this bitmap is activated.
Return Value
True or False depending on the outcome of the operation.
Delphi Example
// Demonstrates how to set a filter for all records containing
// a value ('football') within a memo field
procedure TForm1.Button1Click(Sender: TObject);
var
hBitMap: Integer;
begin
Screen.Cursor := crHourGlass;
ApTbl.DisableControls;
hBitMap := ApTbl.RYOFilterCreate;
ApTbl.GoTop;
while not ApTbl.Eof do
begin
if Pos( 'football', ApTbl.FieldByName('NOTES').AsString ) > 0 then
ApTbl.RYOFilterSetBit( hBitMap, ApTbl.RecNo, True );
ApTbl.Next;
end;
ApTbl.RYOFilterActivate( hBitMap, RYOFILTER_NEW );
ApTbl.GoTop;
ApTbl.EnableControls;
Screen.Cursor := crDefault;
end;
C++Builder Example
void __fastcall TForm1::DBGrid1DblClick(TObject *Sender)
{
if (ApTbl->RYOFilterSetBit( hBitMap, ApTbl->RecNo, true ))
ShowMessage( "Set bit SUCCEEDED for record " + IntToStr( ApTbl->RecNo ) + ".");
else
ShowMessage( "Set bit FAILED for record " +
IntToStr( ApTbl->RecNo ) + ".");
}
See Also
SetQueryBit, GetQueryBit, RYOFilterActivate, RYOFilterCopy, RYOFilterCreate, RYOFilterDestroy