Is there a way to link two listboxes together?

  • Thread starter Thread starter Dominic Isaia
  • Start date Start date
D

Dominic Isaia

I am trying to simulate a multicolumn listbox. I need a way to link
two listboxes together so that if you scroll one listbox the other
scrolls with it. Any help will be appreciated.

Thanks,
Dominic Isaia
(e-mail address removed)
 
Dominic,
Have you considered a ListView instead of a ListBox?

Change the HeaderStyle to None, and the View to Details.

You will have what is effectively a multi column listbox.

Alternatively a ListBox can display multiple columns also, when you add the
string separate each column by a tab character, make sure
ListBox.UseTabStops is on.

Hope this helps
Jay
 
* (e-mail address removed) (Dominic Isaia) scripsit:
I am trying to simulate a multicolumn listbox. I need a way to link
two listboxes together so that if you scroll one listbox the other
scrolls with it. Any help will be appreciated.

Why not use a ListView with multiple Columns and 'View' = 'Details'?
 
I am designing a web form, and I don't believe I can use the listview
class on a web form. It won't let me import the System.Windows.Forms
namespace.

I am designing the listbox with strings and seperating the data by
nonbreaking spaces using a monospace character font. This seems to
work, although it's not pretty. The tabbing solution doesn't always
line up the columns well, especially if you have variable length data,
which is the case most of the time.

I would like to see the ability to create a mulitcolumn listbox in a
future version of VB.NET. It would be nice to be able to add headers
and footers and be able to sort on different columns, select an item
from one column, or have hyperlink text in the columns.

Dominic Isaia
(e-mail address removed)
 
Dominic Isaia said:
I would like to see the ability to create a mulitcolumn listbox in a
future version of VB.NET. It would be nice to be able to add headers
and footers and be able to sort on different columns, select an item
from one column, or have hyperlink text in the columns.

Dominic Isaia
(e-mail address removed)

Thats what the listview does.
 
Hi Rick,

Can you give me a link to that because searching for listview and webform I
could not find anything on MSDN and I want to see that too.

Or is it in the recourse kit, I did install it and uninstall, so maybe I did
not look well.

I am very curious for that information?

Cor
 
Dominic,
I am designing a web form, and I don't believe I can use the listview
Well a web form is an entirely different world! ;-)

You are effectively limited to what you can include in HTML or "controls"
that you can download & run. I hate going to web sites that require me to
download a control to view the site! :-)

What I would suggest you do is look at the
System.Web.Ui.WebControls.DataGrid control. (note I suspect it will not
behave as you want! as again you are limited to what HTML can do!)

Also seeing as web forms need a specific set of knowledge, you may want to
ask this "down the hall" in one of the
microsoft.public.dotnet.framework.aspnet.* newsgroups, I would start with
microsoft.public.dotnet.framework.aspnet.webcontrols.

Hope this helps
Jay
 
Back
Top