[comp.sys.mac.hypercard] Need scrolling "radio menu"

dce@smsc.sony.com (David Elliott) (01/04/90)

I am working on a stack that has two long lists of items (one with
84 items and the other with 128 items).  The user picks one item
out of the list to use as the current value.

I would like to implement each of these as a scrolling list with
the "current" item hilited in some way.  I tried using a scrolling
field with locked text, but I could only have one hilited selection
on the card at a time, and I need to be able to have a hilited line
in each list.

Is there a better way to do what I want?  I think these lists are
really too long for something like a popup menu, and I don't like
the idea of a scrolling popup list (i.e., DoMenu from Developer's
Stack).

-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"But Pee Wee... I don't wanna be the baby!"

rieman@boulder.Colorado.EDU (John Rieman) (01/05/90)

In article <1990Jan4.062312.4244@smsc.sony.com> dce@smsc.Sony.COM (David Elliott) writes:
>I would like to implement each of these as a scrolling list with
>the "current" item hilited in some way.

You might use a bullet or check mark instead of hilighting the items.
(The square root symbol makes an adequate check mark if you don't
have one in the font you're using.  I think it's option v; you can 
confirm with Keycaps.)

-john
rieman@boulder.colorado.edu
U. of Colo.

dlugose@uncecs.edu (Dan Dlugose) (01/05/90)

In article <1990Jan4.062312.4244@smsc.sony.com> dce@smsc.Sony.COM (David Elliott) writes:
>I am working on a stack that has two long lists of items (one with
>84 items and the other with 128 items).  The user picks one item
>out of the list to use as the current value.
>
>I would like to implement each of these as a scrolling list with
>the "current" item hilited in some way.  I tried using a scrolling


   This can be done by pasting transparent hilited buttons over the
selected line.  Of course, you'll have to select the line, figure the
number of lines scrolled above the window (scroll of field x div the
textheight of field x), compare the rect of the window to how many
lines down the selction is, and paste such a button there.

Dan Dlugose
UNC Educational Computing Service

panek@hp-and.HP.COM (Jon Panek) (01/05/90)

I would suggest using a scrolling window which allows you to view a
sub-set of the list at any time.  When you hi-light an item, it is
locked at the top of the scroll area.  The list continues to be
scrollable in the (now reduced by 1 line) scroll window, and you
can select another item.  This allows you to select up to N items
from the list, where N is the size of your scroll window.  You might
want to consider the case where the user decides to select the same
item several times... shouldn't be a big deal to handle.

Jon "never programmed a Mac in my life" Panek
panek@hp-and.hp.com

dce@smsc.sony.com (David Elliott) (01/07/90)

In article <1990Jan4.211451.5405@uncecs.edu> dlugose@uncecs.edu (Dan Dlugose) writes:
>   This can be done by pasting transparent hilited buttons over the
>selected line.  Of course, you'll have to select the line, figure the
>number of lines scrolled above the window (scroll of field x div the
>textheight of field x), compare the rect of the window to how many
>lines down the selction is, and paste such a button there.

At first glance, this looks like a good solution, but it has one major
drawback: If the user scrolls the field, the hilite is wrong.  The
only fix I can see for this is to have the list rescroll on mouseLeave,
which is ugly.

Well, if anyone on the HyperCard team is listening, it would be nice to
have a way to put a scrolling list on the screen that allows an item
to be selected and stay hilited.  The easiest syntactic addition I can
see is

	set the hilight of <field expression> to <true|false>

It only has to work for locked text fields.

-- 
David Elliott
dce@smsc.sony.com | ...!{uunet,mips}!sonyusa!dce
(408)944-4073
"But Pee Wee... I don't wanna be the baby!"