PC Review


Reply
Thread Tools Rate Thread

Checked Listbox?

 
 
dm1608
Guest
Posts: n/a
 
      18th May 2006
Hi, all.

I have a requirement for one of my programs to have a "Checked Listbox" that
contains a list of all my local/remote drives.

I woudl like users to click one or more drives that I need to search for
particular files.

Can anyone tell me how to implement this in .NET 2.0 using VB or C#?

I also need to know how to iterate thru the listbox to determine what items
are selected and extract there value property.

Thank you --



 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      18th May 2006
"dm1608" <(E-Mail Removed)> schrieb:
> I have a requirement for one of my programs to have a "Checked Listbox"
> that contains a list of all my local/remote drives.


Check out the CheckedListBox control.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

 
Reply With Quote
 
 
 
 
Smokey Grindle
Guest
Posts: n/a
 
      18th May 2006
checked list box control or listview control with checkboxes enabled

"dm1608" <(E-Mail Removed)> wrote in message
news:OnuAI$(E-Mail Removed)...
> Hi, all.
>
> I have a requirement for one of my programs to have a "Checked Listbox"
> that contains a list of all my local/remote drives.
>
> I woudl like users to click one or more drives that I need to search for
> particular files.
>
> Can anyone tell me how to implement this in .NET 2.0 using VB or C#?
>
> I also need to know how to iterate thru the listbox to determine what
> items are selected and extract there value property.
>
> Thank you --
>
>
>



 
Reply With Quote
 
=?Utf-8?B?UElFQkFMRA==?=
Guest
Posts: n/a
 
      18th May 2006
I'd use a FileOpenDialog rather than a list box, it allows the user to drill
down and select exactly what they want, saving them time.

.... and how could you list "remote drives", if you mean mapped drives that's
one thing, but otherwise how can you know what drives are available -- the
FileOpenDialog would allow the user to select a drive on another machine
which your application wouldn't know about otherwise.

I think you're reinventing the wheel.

> I have a requirement for one of my programs to have a "Checked Listbox" that
> contains a list of all my local/remote drives.
>
> I woudl like users to click one or more drives that I need to search for
> particular files.


 
Reply With Quote
 
dm1608
Guest
Posts: n/a
 
      18th May 2006
Yeah, but I need them to be able to select multiple drive letters so my
application can scan for the relevent information.

I'm not sure how to use the Checked Listbox control and how to iterate thru
it




"PIEBALD" <(E-Mail Removed)> wrote in message
news:2694E3E5-0857-4C12-8192-(E-Mail Removed)...
> I'd use a FileOpenDialog rather than a list box, it allows the user to
> drill
> down and select exactly what they want, saving them time.
>
> ... and how could you list "remote drives", if you mean mapped drives
> that's
> one thing, but otherwise how can you know what drives are available -- the
> FileOpenDialog would allow the user to select a drive on another machine
> which your application wouldn't know about otherwise.
>
> I think you're reinventing the wheel.
>
>> I have a requirement for one of my programs to have a "Checked Listbox"
>> that
>> contains a list of all my local/remote drives.
>>
>> I woudl like users to click one or more drives that I need to search for
>> particular files.

>



 
Reply With Quote
 
=?Utf-8?B?UElFQkFMRA==?=
Guest
Posts: n/a
 
      18th May 2006
Which they can do with a FileOpenDialog, they can even select multiple
individual files.

 
Reply With Quote
 
=?Utf-8?B?UElFQkFMRA==?=
Guest
Posts: n/a
 
      18th May 2006
> Which they can do with a FileOpenDialog, they can even select multiple
> individual files.


OK, I'm wrong again -- you can't use it to select directories I wish it
could, seems like some lacking functionality.

But my basic point is still valid, I would use an OpenFileDialog to allow
the user to select exactly which files to use.

And consider this: if your application doesn't want to allow the user to
know what files are in use then I don't know why they should know and select
_where_ they are either.

 
Reply With Quote
 
=?Utf-8?B?UElFQkFMRA==?=
Guest
Posts: n/a
 
      18th May 2006
How about a FolderBrowserDialog? Although it doesn't seem to allow selection
of multiple directories


 
Reply With Quote
 
dm1608
Guest
Posts: n/a
 
      19th May 2006
Thanks -- but I think I really want them to select drives and not even have
the ability to select folders.

Drives are really all I need. I.E., they want to search C: drive and D:
drive. Then they'd select both. Otherwise, they would select C: only or
whatever.



"PIEBALD" <(E-Mail Removed)> wrote in message
news:A9661C38-A6FA-4BE7-A153-(E-Mail Removed)...
> How about a FolderBrowserDialog? Although it doesn't seem to allow
> selection
> of multiple directories
>
>



 
Reply With Quote
 
Lawrence R. Steeger
Guest
Posts: n/a
 
      19th May 2006
In article <(E-Mail Removed)>, (E-Mail Removed)
says...
> Thanks -- but I think I really want them to select drives and not even have
> the ability to select folders.
>
> Drives are really all I need. I.E., they want to search C: drive and D:
> drive. Then they'd select both. Otherwise, they would select C: only or
> whatever.
>
> ...


Checkout the DriveInfo class (new in .NET 2.0).

--
Larry Steeger
RusSte, Inc. - http://www.russte.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to use a Treeview with checkboxes to get child nodes to be marked checked when parent node is checked. Jack Microsoft VB .NET 2 12th Oct 2005 03:07 AM
SOLVED: TreeView with 3-state checkboxes (empty, checked, gray checked) Michael A. Covington Microsoft Dot NET 0 21st Jun 2005 07:38 PM
SOLVED: TreeView with 3-state checkboxes (empty, checked, gray checked) Michael A. Covington Microsoft C# .NET 0 21st Jun 2005 07:38 PM
CheckBox Checked=false when checked in DataList yurps Microsoft ASP .NET 0 28th Jan 2005 07:20 PM
checkbox - default checked or un-checked barrfly Microsoft Excel Programming 1 22nd Dec 2003 06:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:33 AM.