I have been able to get a tab like effect using an encoded string:
Dim EncodedString As String = " "
Dim writer As New System.IO.StringWriter
Server.HtmlDecode(EncodedString, writer)
Dim DecodedString As String = writer.ToString()
strNewItem = "Data to Add" & DecodedString
lstTheListBox.Items.Add(New ListItem(strNewItem))
[quoted text, click to view] "Mike" wrote:
>
> Hi,
>
> I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:
>
> lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))
>
> I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?
>
> Thanks
> Mike
"Mike" wrote:
>
> Hi,
>
> I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:
>
> lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))
>
> I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?
>
> Thanks
There should be the following value in the EncodedString
It didn't show in my first reply.
Using the encoded string, I have been able to get close to a multicolumn or tabbed listbox.
It works about the same with
If anyone has any advice to improve the results, please comment further.
[quoted text, click to view] "Mike" wrote:
>
> Hi,
>
> I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:
>
> lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))
>
> I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?
>
> Thanks
This function is useful for making the padded string to add to the end
of the listbox item.
Private Function PadHTML(ByVal numberOfSpaces As Int32) As String
Dim Spaces As String
For items As Int32 = 1 To numberOfSpaces
Spaces &= " "
Next
Return Server.HtmlDecode(Spaces)
End Function
[quoted text, click to view] "hrothenb" <hrothenb@discussions.microsoft.com> wrote in message news:<FB16DE6D-0377-46E3-B146-5D6A36B4FD49@microsoft.com>...
> There should be the following value in the EncodedString
>
>
>
> It didn't show in my first reply.
>
> Using the encoded string, I have been able to get close to a multicolumn or tabbed listbox.
>
> It works about the same with
>
> If anyone has any advice to improve the results, please comment further.
>
>
> "Mike" wrote:
>
> >
> > Hi,
> >
> > I am trying to format some text that I retrieve from a DB. I load the converted (to string) values in an array and then use the following statement:
> >
> > lstChartAccounts.Items.Add(String.Format("{0:15} {1:50} {2:10} {3:10}", value))
> >
> > I would like my ListBox (WebControl) to show the data "tabbed," but I cannot make it work. Any idea on what is wrong here?
> >
> > Thanks
Don't see what you're looking for? Try a search.