1

I'm new to C# and VS and I'm trying to import a project named ObjectListView into Visual Studio. I downloaded the whole package and the ObjectListView project from here: http://objectlistview.sourceforge.net/cs/download.html

Some sources say that I need to use Add Reference and choose the .dll file. I added ObjectListView.dll It's in the References Tab Is this how I'm supposed to import an external package?

However, when I used the using clause, the ObjectListView is not a valid identifier.

Edit: How do I add the ObjectListView into the Toolbox?

Donovan Keating
  • 1,715
  • 3
  • 17
  • 27
  • I meant that it should be a completely new question. But that's okay. One question per 'thread' is much easier to find for others having the same issue (referencing/using the .dll OR adding the controls to the toolbox). – IAbstract Dec 29 '16 at 23:45
  • 1
    Possible duplicate of [How to add User control in the toolbox for C#.net for winforms by importing the dll to the reference?](http://stackoverflow.com/questions/2101171/how-to-add-user-control-in-the-toolbox-for-c-net-for-winforms-by-importing-the) – Uchiha Itachi Dec 29 '16 at 23:50
  • @GeoffOverfield: had the question been only about adding a control to the winform toolbox the, yes. – IAbstract Dec 30 '16 at 17:04

1 Answers1

2

Try:

using BrightIdeasSoftware;

When all else fails, I think you can look at an object browser or ... download the source and investigate. You should install via NuGet and references will be added for you.

You could also download the sample project to understand how to use the library.

Compiled sample:

using BrightIdeasSoftware;

namespace ClsLib1
{
    public class Class1
    {
        private ObjectListView _listView;

        public Class1()
        {
            _listView = new TreeListView();
        }
    }
}

To add the controls to the toolbox:

  1. Right-click and add new tab
  2. Right-click in the new tab and select 'Choose Items...'
  3. Browse to the ObjectListView.dll and select
IAbstract
  • 19,551
  • 15
  • 98
  • 146