Re: Win32Lib: Disable Focusability
- Posted by Don <eunexus at yahoo.com> Aug 04, 2004
- 504 views
> > > How would I make a ListView unfocusable? That is, I want the list > > > to display normally, but I want to prevent any selection. If I > > > "disable" the list, it displays with a gray background and light > > > characters and it cannot be scrolled. I know there must be a way > > > to make it display normally, but just not be able to have selections > > > made, yet still scroll it. :) > > > > What's the problem with making selections? You don't have to *do* anything > > when a selection is made. > > Well, I don't want my user thinking, "Okay, I've selected it. What can > I do with it?" Just a nice, plain, black text on white background list > that can be scrolled. > > > Anyhow, there is no real easy way to do this. You might have to catch > > selection events then deselect the item manually. > > I smell a EuControl in the making! (Tommy?!) :) I dont know if a custom control for this is the way to go. I can (offhand) think of two or three different ways to do this. 1> subclass the control and intercept all mouse events unless its over the scroll bar. 2> create a "see through" window the same size as the client area of the ListView. actually I can think of more, but these would be the easiest =) I will play around with some of these ideas tonight and if I get anything working ill let you know... Don Phillips - aka Graebel National Instruments mailto: eunexus @ yahoo.com