Does anyone know what's C++'s SETW() Equivalent in Visual Basic .NET ?

SETW: Sets the number of characters to be used as the field width for the next insertion operation.

Is there anythign similar in VB.NET.

Note: I want to use in a ListBox.

I've tried using:

Dim fmtStr As String = "{0, 15}{1, 10}{2, 8}"
lstOutput.Items.Add(String.Format(fmtStr, data0, data1, data2))

But it doesn't work as SETW.

Hi, I think you are trying to display Multiple columns. Why dont you consider about the other controls that capable of display multiple columns (Like Grid control or ListView).

In listbox all the character should not have the same width because of font.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.