I’ve been tinkering with a homegrown listbox.
The listbox is composed of an array of WebLabels which are each embedded into a WebContainer.
Both the web container and weblabel are the same sizes 22 x 100
I set the text style of the WebLabel to be a courier font, left justified…
but this is what I get.
Font size? What do you call it when the g goes below the bottom of a character? The serif?
I have to confess that I took a shortcut and laid out the row with labels preset. It worked fine. But when you create the labels as a container and embed them in the row and then embed the row in the list, the label gets offset. If you change the label to a webtextfield, they turn out ok. File a bug report.
I took your advice and submitted a but report.
I changed the WebLabel to a WebTextField and that now displays perfectly.
However I modified the AddRow method to add 10 rows…
worked great.
stepped it up to twenty rows and then nothing is displayed at all.
Tried enabling the scroll bars. (Always). Didn’t help.
Sub Shown()
DynaView1.AddRow
End Sub
[code]Sub AddRow()
dim Header(-1) as string = Array(“Column 1”, “Column 2”, “Column 3”, “Column 4”, “Column 5”)
dim data(-1) as string = Array(“Data 1”, “Data 2”, “Data 3”, “Data 4”, “Data 5”)
dim r as WebDynaViewRow
r = new WebDynaViewRow
r.SetRow(0, false, Header, false, true)
r.EmbedWithin(self, 0, 0, r.Width, r.Height)
Rows.Append®
top = 22
for i as integer=0 to 10
r = new WebDynaViewRow
r.SetRow(1, false, data, true, false)
r.EmbedWithin(self, 0, top, r.Width, r.Height)
top = top + r.Height
Rows.Append®
next
System.DebugLog(“Done”)
End Sub
[/code]
I’ve also noticed that the actual listbox isn’t at the top of the web page.