On 16 Apr 2019, at 5:04 am, Keith Culotta via 4D_Tech <4d_tech@lists.4d.com> 
> Hello,
> I'm looking for a fast way to highlight a selection of rows in an entity 
> selection listbox.  The way I am aware of works OK unless the listbox gets a 
> large number of rows.
> Adding records to the Selected Items name in the Property list does not 
> highlight the listbox contents.  The equivalent of adding records to the 
> "UserSet" is not available with entity selection listboxes.
> Highlighting all with LISTBOX SELECT ROW(*;"listBox";0;lk add to selection) 
> crashes 4D if the listbox contains enough records.
> LISTBOX SELECT ROW(*;"listBox";$position;lk add to selection) crashes if put 
> in a fast FOR loop.  If the loop is executed more slowly there is success.  
> The slowness comes from looking for entitySelected[i] within the entity 
> selection and highlighting its position in the listbox.
> Is there a better way to get there?

Hey Keith

Are you clearing the listbox selection first (with LISTBOX SELECT 
ROW(*;"listBox";0;lk remove from selection)? If so, that is probably the cause 
of the crashing you are seeing. You can workaround it by highlighting and 
unhighlighting the first row instead, i.e. 

LISTBOX SELECT ROW(*;"listBox";1;lk replace selection)
LISTBOX SELECT ROW(*;"listBox";1;lk remove from selection)

4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com

Reply via email to