Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

EnableWindow does not work with OwnerDraw Listbox

Status
Not open for further replies.

Lorey

Programmer
Feb 16, 2003
88
0
0
SG
Hi Experts!

I have a owner draw list box. But when I try to disable the window using .enableWindow(true) it does not work.

What can I use?
 
Well, listbox.enableWindow(true) will [red]en[/red]able the window, not [red]dis[/red]able it. You need enableWindow(false) to disable it.

Please define "doesn't work." Do you mean you don't get the new callbacks to redraw the listbox items in a disabled state? If you have a visible scroll bar in the list box, is that disabled when the list box is disabled?
 
Oh sorry, i mean enablewindow(false) doesnt work.

Anyway, I found a solution, I used ODS_DISABLED to check if the item is disable or not, and then manually change the color of item to look like it really is disable. thanks for not ignoring my question. ;)



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top