Re: Disable/Enable selected lines in a field

2004-03-03 Thread Bojsza
Thanks Rob,

This put me on the right track.

Glen

On Wednesday, March 3, 2004, at 09:13 AM, Rob Cozens wrote:

Hi Glen,

I have two fields where a user hilites single or multiple lines in 
field "aChoiceList" and then presses a button "Yes" which copies the 
selected lines into field "aSelectedList".

What I am wanting to do is to some how gray out the lines and disable 
them from being selected in field "aChoiceList" that now show in the 
field "aSelectedList.

If the user selects lines in the field "aSelectedList and clicks 
another button "return" then the lines are removed from the field 
"aSelectedList and the associated lines in the field "aChoiceList" 
become ungrayed and available to select again in the future.

Have you checked out the possibility of setting the textcolor of the 
lines instead of the hilite?

on mouseUp
  lock screen
put  return&(fld "aSelectedList") into previousSelections
get fld "aChoiceList"
 repeat with x = 1 to the number of lines of it
 /* I don't think "repeat for each line aLine in..."
gets you the textColor*/
   if the textColor of line x of fld "aChoiceList" is not grey 
then next repeat
   if offset(cr&(line x of it)&cr,previousSelections)<>0 then next 
repeat

put line x of it & cr after fld "aSelectedList"
  end repeat


  unlock screen
end mouseUp
To select" a line, set its textColor to grey; to deselect it, set the 
textColor to empty.
--

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm
"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."
from "The Triple Foole" by John Donne (1572-1631)
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution


Disable/Enable selected lines in a field

2004-03-03 Thread Bojsza
Hi,

I have two fields where a user hilites single or multiple lines in 
field "aChoiceList" and then presses a button "Yes" which copies the 
selected lines into field "aSelectedList".

What I am wanting to do is to some how gray out the lines and disable 
them from being selected in field "aChoiceList" that now show in the 
field "aSelectedList.

If the user selects lines in the field "aSelectedList and clicks 
another button "return" then the lines are removed from the field 
"aSelectedList and the associated lines in the field "aChoiceList" 
become ungrayed and available to select again in the future.

I have tried the following but as soon as the user clicks any line in 
the field "aChoiceList" then the hilites are gone and it is still 
possible for them to select and copy the same line again --undesired.

on mouseUp
  lock screen
  if fld "aSelectedList" is not empty then
put cr after fld "aSelectedList"
  end if
  put hilitedlines of fld "aChoiceList" into aclist
  repeat for each item l in the hilitedlines of fld "aChoiceList"
put line l of fld "aChoiceList" & cr after fld "aSelectedList"
  end repeat
  set the hilitedlines of fld "aChoiceList" to aclist

  if fld "aSelectedList" is not empty then
delete last char of fld "aSelectedList"
  end if
  unlock screen
end mouseUp
___
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution