Subject | Re: [IBO] multi-select |
---|---|
Author | Jason Wharton |
Post date | 2001-06-21T17:56:25Z |
Where is the yellow coming from?
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com
----- Original Message -----
From: "John Tomaselli" <jrt@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, June 18, 2001 10:14 PM
Subject: [IBO] multi-select
> In version 3.6.Dg I have noticed that when using Mult-Select (Ctrl+left
> mouse) with the defalt settings of ib_grid will cause the text to turn
white
> and the backound yellow making it quite un-readable.
> Any Ideas?
> TIA
> John
>
> -----Original Message-----
> From: Geoff Worboys [mailto:geoff@...]
> Sent: Thursday, May 03, 2001 10:32 PM
> To: IBObjects@yahoogroups.com
> Subject: Re: [IBO] multi-select
>
>
> > i want to copy records(more then one, but not all) from one
> > ib_grid into another one that looks on a different table.
> > i've found the onmultiselect-method in the ib_query but
> > couldn't find out how to use it.
>
> OnMultiSelect is called when SelectAll or SelectRange is called for
> the query. Which will happen on a grid when you have IndicateSelected
> set to true and the user hold the Shift (or Ctrl+Shift for all) key
> down while left clicking (to select) or right clicking (to unselect) a
> range of records.
>
> However I suspect this is not what you are specifically looking for...
>
> TIB_Query has an array property Selected[] which allows you to
> set/detect whether a particular row (by row number) has been selected.
> It also has a method SelectedBookmarks that allows you to a fill a
> string list with bookmarks of all records that were selected. eg.
>
> var
> strs: TStringList
> begin
> strs := TStringList.Create;
> try
> IB_Query.SelectedBookmarks( strs );
> <do something with the list>
> finally
> strs.Free;
> end;
> end;
>
>
> In your instance, wanting to copy records from one dataset to another,
> I imagine something like...
>
> for i := 0 to strs.Count - 1 do
> begin
> // move the source dataset buffer position
> // to the specific record for copying
> IB_Query.BufferBookmark := strs[i];
> // then setup the copy
> DestinQuery.Insert;
> <copy required fields>
> DestinQuery.Post;
> end;
>
>
> If there is likely to be a large number of records, you may be better
> off performing the insert using a separate DSQL component setup
> specifically to insert using parameters, and then refresh the
> destinquery when all the inserts are done.
>
> HTH
>
> Geoff Worboys
> Telesis Computing
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>