Re: Win32Lib: Disable Focusability

new topic     » goto parent     » topic index » view thread      » older message » newer message

> > > 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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu