Click here to Skip to main content
Click here to Skip to main content

An extended ListBox control

, 17 Dec 2002
Rate this:
Please Sign up or sign in to vote.
A control that offers extensible entry specification and full keyboard support.

Sample Image - ListBoxEx.jpg

Introduction

This control is a .NET version of the extended ListBox editor that originally showed up in Visual Studio. The control offers an extensible interface for specifying ordered entries of data items in string format. The control uses a button at the end of each line in the list, to allow the user a custom interface for specifying the text for that entry.

In addition to the GUI, the control offers full keyboard support for specifying entries in the list.

INSERT Creates a new item at the end of the list
DELETE Deletes the currently selected item
CTRL+UP ARROW Moves the selected item up in the list
CTRL+DOWN ARROW Moves the selected item down in the list
ENTER Calls to the IBrowser interface to allow the user to specify a value

The namespace defines an interface IBrowser that allows a programmer to extensibly specify how to obtain the value for the selected entry. With this interface, a programmer could specify any type of interface for configuration data. As long as the data can be represented as a string, the configuration data can be ordered by this control.

public interface IBrowser
{
    string Value
    {
        get;
        set;
    }
}

The control comes with a simple IBrowser implementation called OpenFileBrowser. This implementation simply creates the OpenFileDialog object and allows the user to specify a particular file. The genesis for the control was to have a base control to use, for specifying lists of IP Address specifications/ranges.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

ClearlyDotNet
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
QuestionCan I use your project in my project? Pinmemberweiqj27-Jul-06 9:10 
AnswerRe: Can I use your project in my project? PinmemberRunnerDude6-Jul-07 8:56 
NewsAdvanced list box and combo box Pinmemberbrett5630-Nov-05 6:56 
General... but it does not inherit from ListBox PinmemberPeter Smartt25-Nov-03 13:27 
GeneralRe: ... but it does not inherit from ListBox PinsussMaciek Plewa10-Mar-04 5:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.141223.1 | Last Updated 18 Dec 2002
Article Copyright 2002 by ClearlyDotNet
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid