473,699 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multicolumn Listbox

WRH
Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...

this.listBox3.I tems.AddRange(n ew object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });

It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?


Oct 22 '07 #1
5 17750
Hi,

Each object is a comma separated list of values so I assume that the listbox
expect that you define the columns that way.

You failed to mention if this is a web or a win example ( I assume that a
window)

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...

this.listBox3.I tems.AddRange(n ew object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });

It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?


Oct 22 '07 #2
WRH
Thanks for the quick reply.
Further testing shows that the last 3 items went into column 2 only
because of the height of the listBox (No vertical scroll) What I want
is to specify the column for an item.

Using windows forms, MS VC# 2005 express edition
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Hi,

Each object is a comma separated list of values so I assume that the
listbox expect that you define the columns that way.

You failed to mention if this is a web or a win example ( I assume that a
window)

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...

this.listBox3.I tems.AddRange(n ew object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });

It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?



Oct 22 '07 #3
Hi,

You have to read the docs and see what format ListBox expect for
multicolumns lists.

I just found the txt:
A multicolumn ListBox places items into as many columns as are needed to
make vertical scrolling unnecessary. The user can use the keyboard to
navigate to columns that are not currently visible. Set the
HorizontalScrol lbar property to true to display a horizontal scroll bar that
enables the user to scroll to columns that are not currently shown in the
visible region of the ListBox. The value of the ColumnWidth property
determines the width of each column.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
Thanks for the quick reply.
Further testing shows that the last 3 items went into column 2 only
because of the height of the listBox (No vertical scroll) What I want
is to specify the column for an item.

Using windows forms, MS VC# 2005 express edition
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>Hi,

Each object is a comma separated list of values so I assume that the
listbox expect that you define the columns that way.

You failed to mention if this is a web or a win example ( I assume that a
window)

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******* *********@TK2MS FTNGP06.phx.gbl ...
>>Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...

this.listBox3.I tems.AddRange(n ew object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });

It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?




Oct 22 '07 #4
WRH
Thanks again for the info.

I have decided to use ListView instead, as it seems much
more manageable with regard to columns.

I could not be sure what the user may see at any given
time with a multicolumn ListBox!

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:u9******** ********@TK2MSF TNGP02.phx.gbl. ..
Hi,

You have to read the docs and see what format ListBox expect for
multicolumns lists.

I just found the txt:
A multicolumn ListBox places items into as many columns as are needed to
make vertical scrolling unnecessary. The user can use the keyboard to
navigate to columns that are not currently visible. Set the
HorizontalScrol lbar property to true to display a horizontal scroll bar
that enables the user to scroll to columns that are not currently shown in
the visible region of the ListBox. The value of the ColumnWidth property
determines the width of each column.

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******** ********@TK2MSF TNGP06.phx.gbl. ..
>Thanks for the quick reply.
Further testing shows that the last 3 items went into column 2 only
because of the height of the listBox (No vertical scroll) What I want
is to specify the column for an item.

Using windows forms, MS VC# 2005 express edition
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote
in message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>>Hi,

Each object is a comma separated list of values so I assume that the
listbox expect that you define the columns that way.

You failed to mention if this is a web or a win example ( I assume that
a window)

--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2****** **********@TK2M SFTNGP06.phx.gb l...
Hello
I want to have a multicolumn listbox. I never used one before
so I looked at a Help example. I set the multicolumn property and
the column width and tested with this example...

this.listBox3.I tems.AddRange(n ew object[]
{
"Item 1, column 1",
"Item 2, column 1",
"Item 3, column 1",
"Item 4, column 1",
"Item 5, column 1",
"Item 1, column 2",
"Item 2, column 2",
"Item 3, column 2" });

It works perfectly, with column 1 items is column one and column 2
items in column 2. Now here's why I posted...I don't understand the
example! What is there that results in a two column list with 5 lines
in column 1 and 3 lines in column 2?




Oct 22 '07 #5
Hi,
--
Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.
"WRH" <no****@videotr on.cawrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Thanks again for the info.

I have decided to use ListView instead, as it seems much
more manageable with regard to columns.

I could not be sure what the user may see at any given
time with a multicolumn ListBox!
Wise decision, Listview is the control for that.
Oct 23 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
33941
by: Mazin Al-Noaimi | last post by:
Hi all, I want to add three values each time to the list box to be as one record for example I have first name, last name, phone number values I want to add them to a listbox once to be three column so can any body help in this particle code ....
4
2624
by: kackson | last post by:
Hi. I attempted to create a multicolumn listbox for my web based aspx application. I search the net, all I get is something like listview or I need to have system.windwos.form. But for the goodness of my brain, I cant seem to find it anywhere and just not able to do a "using System.WIndows.form". WHere on earth can I get this work? Please help! I just need a simple multicolumn listbox. Why is this so difficult? :(
6
3205
by: Lars Netzel | last post by:
I have ask this before and I got a link to a solution where you actually show a new from on top of everything with a listbox in, where you can have multicolumns.. and that's what I use now.. That look sokay but it's not a true Combobox... at all.. So my my customer wants to be able to type stuff into the textfield of combobox and then it's preselected in the list... With the solution I got that' simposiible.. since there are no real...
1
5051
by: zoneal | last post by:
Hi I have a form with a listbox, two comboboxes and two Radiobuttons. What I want to do is make a selection from both comboboxes and either Radiobutton and display these three elements across the top of the listbox eg. 5, 10, 'Go' As I need multiple rows of data I have a button to 'Load' this to the listbox. I'm stuck though as I'm having difficulty loading this correctly. Question: Woulkd I be better off with a datagrid for this job,...
7
6117
by: Paul Bromley | last post by:
How can I use this please - I need 2 columns. I have been having difficulty finding info on this and the 2005 Treeview control today. Many thanks for any links or info, Paul Bromley
1
1805
by: mkhmer | last post by:
I am now trying to add a listbox with multicolumn data item into my ASP.Net page using VB.net language, but it seems to be impossible. Anybody got clue on this? Your suggestion is warmly appreciated. Thanks MKhmer
2
2035
by: dev.amit | last post by:
Hello Friends I am a new bee to the world of vb. I have an appication in the MS Access and now i have to convert it to the Vb. I am having problem creating multicolumn Listbox in the vb form. I have dont it quite simply with ease in Access but here i am blank. 1.I want to show Three column in the list box. 2. I would populate this with the help of a query which picks data from two tables
6
35086
by: is49460 | last post by:
Hello! I have two textboxes and a multicolumn listbox on the form. User enters first name in one textbox and last name in the other. After "submit" button is clicked I want first and last name to be displayed in the listbox (first name in column 0 and last name in column 1). Can anyone help me with what list function I should use? I've tried using listbox.additem function passing array as parameter, but that does not work. Any help would...
3
5639
balabaster
by: balabaster | last post by:
Hey guys and gals, I'm not sure if this is the simplest way to do this or if someone can throw any other ideas out there. I'm looking to build a treeview inside a listbox...or have a multicolumn treeview. Having done some research it seems there was some rather extensive and laborious methods for achieving such an effect in VB6 but none of them satisfactory and the only method I can find that looks anywhere near like it might possibly be...
0
8704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8623
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9054
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8940
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7781
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3071
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.