ListBox Horizontal ScrollBar
Posted: Fri Aug 24, 2012 1:15 pm
Hello,
I am using the following code to programmatically add items to a ListBox control:
string[] filePaths = Directory.GetFiles("\\FlashDrive\\Project\\Project Files", "*.pdf");
foreach (string filePath in filePaths)
{
myListBox.Items.Add(Path.GetFileName(filePath));
}
When I add items this way, the horizontal scrollbar never appears on the ListBox control, even when the filenames are too long to display in the space available.
However, if I add items from within the IDE, using the "Configure Texts" button, the scrollbar appears as soon a text is too long to fit.
Shouldn't the scrollbar also appear when I add items programmatically? Is this a known issue? And is there a workaround?
I am using iX 2.0 and OS v1.09 (v1.04) on a QTerm-A12.
Thanks
I am using the following code to programmatically add items to a ListBox control:
string[] filePaths = Directory.GetFiles("\\FlashDrive\\Project\\Project Files", "*.pdf");
foreach (string filePath in filePaths)
{
myListBox.Items.Add(Path.GetFileName(filePath));
}
When I add items this way, the horizontal scrollbar never appears on the ListBox control, even when the filenames are too long to display in the space available.
However, if I add items from within the IDE, using the "Configure Texts" button, the scrollbar appears as soon a text is too long to fit.
Shouldn't the scrollbar also appear when I add items programmatically? Is this a known issue? And is there a workaround?
I am using iX 2.0 and OS v1.09 (v1.04) on a QTerm-A12.
Thanks