Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ColorListBox1.Items.Clear()
Dim liRed As ListItem
Dim liBlue As ListItem
liRed = New ListItem("WebForm1.aspx")
liRed.Attributes.Add("style", "color: blue")
liBlue = New ListItem("WebForm2.aspx")
liBlue.Attributes.Add("style", "color: red")
ColorListBox1.Items.AddRange(New ListItem() {liRed, liBlue})
End Sub
Herfried, the ColorListBox1 is the combobox
If You take the "WebForm1.aspx" and make it " WebForm1.aspx"
this will not show up as being indented in the
combobox which is what I am after.
Thanks
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:O6**************@tk2msftngp13.phx.gbl...
"barry" <fl******@ix.netcom.com> schrieb: Have tried a number of things including space(n) in front of the string
but
when the DropDownList is shown the spaces have apparently been trimmed.
Is this something that would have to be done in a custom control?
I would like the spaces to be at the front end of the string "
xxxxx".
I am not able to reproduce this behavior with .NET 1.1's Windows Forms
combobox control.
In vs.net I am doing a listitem(string)
Could you please post the code you use to populate the combobox?
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>