|Date: ||Sun, 20 Apr 2008 17:32:23 -0400|
|Reply-To: ||"Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||"Richard A. DeVenezia" <rdevenezia@WILDBLUE.NET>|
|Subject: ||Re: AF: Disabling a List Box|
|Content-Type: ||text/plain; charset="iso-8859-15"|
Lorne Klassen wrote:
> I have a list box that is meant for viewing items only. The user
> should not select items. So I set the list box's enabled property to
> NO. But the problem with this is that I'd still like the user to be
> able to scroll the list box. The other problem is the items are
> colored gray when it's disabled. I would like to have the list box
> items black instead of gray.
> Is it possible to have enabled set to YES but somehow prevent the
> user from selecting items?
> I can simply set the selectedIndexes property to 0 whenever the user
> clicks the list box but I think they would lose their scroll position
> since it would scroll back to the top of the list. Plus there may be
> some flashing.
I wouldn't call it flashing, more of a single blinking.
topRow = listbox1.topRow;
listbox1.selectedIndex = 0;
listbox1.topRow = topRow;
Richard A. DeVenezia