Hilite List Question
Posted: Fri Jun 15, 2012 10:28 pm
I've got a Text Field that is set for Mutiple Hilites but as soon as I change cards any lines selected or hilited disappear.
So this code saves all the hilited lines to a global variable:
Fine. Now I want to restore those selected lines when the card reopens.
You can't select multiple lines the way you would ordinarily select individual lines.
So I tried to iterate through the list of saved lines to restore them one by one.
The loop works fine, except each subsequent select clears all previously selected lines,
even though the text field remains set as Multi Hilite.
I tried experimenting with the SelectedLines function, but that didn't work.
Nothing much in the Dictionary on this, and I searched the forum too.
Any suggestions would be appreciated.
So this code saves all the hilited lines to a global variable:
Code: Select all
on closecard
global saved
put hilitedline of fld "main.list" into saved
end closecard
You can't select multiple lines the way you would ordinarily select individual lines.
Code: Select all
on opencard
select the line of fld "main.list" to saved
end opencard
Code: Select all
on opencard
put number of items in saved into cnt
repeat with ii = 1 to cnt
put item ii of saved into here
select line here of fld "main.list"
end repeat
end opencard
even though the text field remains set as Multi Hilite.
I tried experimenting with the SelectedLines function, but that didn't work.
Nothing much in the Dictionary on this, and I searched the forum too.
Any suggestions would be appreciated.