문제

Probably a simple question, but still a mystery:

Error: 'System.Windows.Forms.ListBox' does not contain a definition for 'DrawMode' ...

How is this possible? Yesterday I tinkered with DrawMode and made a great listbox. Now in the same Visual Studio 2008 environment, but different project, this error. ListBox.SelectedItem etc is available, why not .DrawMode ??? I do have 'using System.Windows.Forms;' in my source.


OK This is what I found in the microsoft manual:

The .NET Compact Framework does not support the DrawMode, DrawItem, and other drawing members for list box and other controls, but you can program that functionality.

I am back into programming.

도움이 되었습니까?

해결책

You have probably created the wrong kind of project.

For example, System.Windows.Controls.ListBox doesn't contain a DrawMode property.

다른 팁

You probably confused System.Windows.Forms.ListBox from windows forms with the one from asp.net webforms System.Web.UI.WebControls.ListBox or the one of WPF System.Windows.Controls.ListBox (which both do not have that property).

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top