Any ideas on what might be the best way to create a "read
only" listbox in a dialog box (i.e. scrolling is enabled but no items
can be selected)? Disabling the listbox is visually unacceptable as it
greys out the entries.
One avenue I've explored which might be in the right direction
is to use an edit window rather than a listbox. The tricky part (for
me at least) is only showing a vertical scroll bar when it's
necessary. I like the way a listbox handles it automagically. Any
advice on this topic, too, would also be appreciated.
Thanks In Advance,
--
Dave Hoy | | (513) 865-1871
Mead Data Central | The lottery is a tax on | Common Object Library
P.O. Box 933 | people who are bad at math. | hoy...@meaddata.com
Dayton, Ohio 45401 | | uunet!meaddata!hoyski
Try subclassing the listbox and trapping WM_BUTTONDOWN messages and
also WM_CHAR (space, enter etc) this might work.
You could also try doing an owner-draw listbox and draw the text the
same way, regardless of the selection state indicated in the
WM_DRAWITEM message's structure.
Anyone else have any comments on these options ?
tonyB.
--
*************************************************************
* abo...@netcom.com * That's me here... *
* a...@walker.com * That's me at work... *
* a...@sactoh0.sac.ca.us * This was the first. *.
* 7025...@compuserve.com * this is the expensive one ! *
*************************************************************
* "I'm sorry Mr. Boggis, we have no rooms left" *
* "Well, if the President was coming, you'd have a room for *
* him, wouldn't you?" *
* "Well, yes sir." *
* "Well, he's not coming, so I'll have his room then!" *
*************************************************************
Rob
--
\------------------------------------------------------------------------/
\ Robert Salesas | Internet: Robert_...@mindlink.bc.ca /
\ Eschalon Development Inc. | CIS: 76625,1320 Tel/Fax: 604-520-1543 /
\------------------------------------------------------------------------/