ListBox, Multi-Column effect?

patrick

Well-known member
Joined
Dec 5, 2021
Messages
248
Programming Experience
1-3
ListBox, Multi Column effect

Is there any way to create a multi-column effect?

The method below is fine. Is there any other way?

aaa.png
 
Last edited by a moderator:
A WebForms ListBox gets rendered as a HTML <select>. There is no multicolumn support for the HTML <select>.

You need to stop literally translating them at WinForms program you are trying to port, and step back a little to see what the objective of the UI is, and then find the appropriate HTML control that gives the same idea or accomplishes a similar objective.

If you really want to use the ASP.NET ListBox then just like in Windows, you would use a fixed size font and then put spaces to simulate columns.
 
A WebForms ListBox gets rendered as a HTML <select>. There is no multicolumn support for the HTML <select>.

You need to stop literally translating them at WinForms program you are trying to port, and step back a little to see what the objective of the UI is, and then find the appropriate HTML control that gives the same idea or accomplishes a similar objective.

If you really want to use the ASP.NET ListBox then just like in Windows, you would use a fixed size font and then put spaces to simulate columns.
I'm having a hard time with the ListView in ASP.NET.
The ListView problem is still not resolved. So I thought of ListBox as an alternative.
ListBox is not multi-column, so it is unlikely.

Migrating ListView in Winform to ListView in Webform is too hard.
 
I'm having a hard time with the ListView in ASP.NET.
The ListView problem is still not resolved. So I thought of ListBox as an alternative.
ListBox is not multi-column, so it is unlikely.

Migrating ListView in Winform to ListView in Webform is too hard.
It's not an ASP.net problem.
I suggest you have a look at incorporating one of the many front end styling frameworks with ASP.net, for example:
...and then look at how they style multicolumn list layouts.
 
Back
Top Bottom