Click here to Skip to main content
12,553,991 members (64,104 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
Hi, i want an urgent help in the below quest.
I'm on a UI where if i select any value in a dropdown list, it shows a listbox of data linked to it.

Currently we have grid [edit: set the 'Enabled property of the ListBox to 'false, which causes it to appear greyed-out] out the listbox, but we require to make this list box invisible.

How should i continue.
Currently we are using

How to make this schemelistbox invisible????? .
Posted 3-Jan-13 21:10pm
Updated 4-Jan-13 10:46am
There are different types names "ListBox". Full name, please.
Naz_Firdouse 4-Jan-13 4:44am
BillWoodruff 4-Jan-13 16:47pm
I think this is the correct answer, and probably all the user needs.
ChrisTopherus 4-Jan-13 13:11pm
or myListBox.Visibility = Visibility.Hidden

in general: please try to post a snippet of code to questions like that!

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I answered this yesterday. Has it been asked again ? Please don't ask the same question again, edit the old question to ask for more info or add detail. In this case, the visible property may not work if enabled is false, but it does work and do what you want.
BillWoodruff 4-Jan-13 18:40pm
"the visible property may not work if enabled is false"

The Enabled and Visible Properties of a WinForms Control do not interact. Setting 'Enabled to 'false does not prevent you from making a Control visible, or hidden. Of course, if a Control is hidden, you could say that its being "Enabled" has no "meaning."
Christian Graus 4-Jan-13 19:01pm
Then there is no reason for his code not to work, right ? I didn't think so, but it was the only reason I could see for this to be a valid question
BillWoodruff 4-Jan-13 19:22pm
Hi Christian,

My comment only addressed a technically incorrect statement about the 'Enabled and 'Visible Properties in WinForms .NET.

His code doesn't work because of a spelling error.

Unfortunately, that's not the last question we'll see where the only thing wrong is a spelling error :) Happy New Year, Bill

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.161021.1 | Last Updated 4 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100