Subject Re: [IBO] Getting a record bookmarked. - ie toggleing its bookmarked state programatically?
Author Ramil
Hello Adrian,

You can do it like this:

If IB_Query1.Locate(NameId,.[]) then
IB_Query1.Selected[IB_Query1.RowNum] := True;


My example for inverse seelection:

with SomeQuery do
begin
bm:=Bookmark;
DisableControls;
try
First;
while not Eof do
begin
Selected[RowNum]:=not Selected[RowNum];
Next;
end;
finally
Bookmark:=bm;
EnableControls;
end;
end;

> Hi, I can get the selected bookmarked records, but how do I go about
> physically bookmarking a record programatically.

> Lets say for explanation purposes:

> I want a user to select from a list of names.

> I store the selected names.

> But then when the user selects from the names again, I want to display all
> the names, but allready have the names previously selected highlighted in
> the grid, ie bookmarked.

> So I locate the record, but once located, how do I toggle its bookmarked
> state programatically.

> Ie:

> If IB_Query1.Locate(NameId,.[]) then

> IB_Query1.SetBookmarked?? ??SetSelected??

> I'm missing the obvious here, just need my eyes to be opened!

> Regards

> Adrian



--
Best regards,
Ramil khabibr@...