[comp.sys.mac.programmer] How do I make a "List Box" control?

riordanmr@clvax1.cl.msu.edu (Mark Riordan) (11/05/90)

I am looking for an implementation of a "List Box" control
for a dialog box.  This control would have a scrolling window 
of strings fed to it by the application; some of these strings
would be selected by the user, and then an OK button
would be pressed.  That is, what I'm looking for is similar 
to what's done in the Open File dialog box, but with 
multiple selection possible (and, of course, arbitrary strings, 
not file names).

I am writing an application targeted toward both the Mac and
MS Windows, and have so far been struck by the similarility 
between the two environments.  However, MS Windows has
a List Box control which does exactly what I want, whereas 
the Mac seems to have nothing of the sort.  I could build my
own from scratch, but first I want to check to see if any code
fragments are available to help me.  C is preferred, as the 
application is already 7000 lines of MS C 6.0/THINK C 4.0.
(Thank heavens for #ifdef!)

Thanks!

Mark Riordan    Michigan State University   riordanmr@clvax1.cl.msu.edu

Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) (11/10/90)

In a message to All dated 11/05/90 at 21:08:35, Mark Riordan writes:
 
MR> I am looking for an implementation of a "List Box" control for a
MR> dialog box. This control would have a scrolling window of strings
MR> fed to it by the application; some of these strings would be
MR> selected by the user, and then an OK button would be pressed. That
MR> is, what I'm looking for is similar to what's done in the Open File
MR> dialog box, but with multiple selection possible (and, of course,
MR> arbitrary strings, not file names).

Look at the List Manager Chapter in IM IV.  I think it's what you want.

 

--  
Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker
Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org