1). Well you don't need any method. If the list box has more items than its height, scrollbars automaticlally attached to it.
2). You may use ListBox.IsSelected(itemindex) method to check if an item is selected or not. Kindly check the following sample example for your reference. I used a template file attached:
//We have a list box which has three items selected i.e., first, third and fifth.
lst.SelectionType = SelectionType.Multi; //Select the second item. lst.SelectedItem(1, true); //Select the 6th item (last item) lst.SelectedItem(5,true); check1 = lst.IsSelected(1); bool check5 = lst.IsSelected(5); MessageBox.Show(check1.ToString());//now it should be true. MessageBox.Show(check5.ToString());//should be true now.
Q2, Please try this fix. We add ListBox.SelectedCells property to get all selected cells. If the input range is not set or no item is selected, it will return null.
See following codes :
Aspose.Cells.Cell[] selectedCells = ((ListBox)(workbook.Worksheets[0].Shapes[0])).SelectedCells; for (int i = 0; i < selectedCells.Length; i++) { Console.WriteLine(selectedCells[i].Value); }
The property .selected items does not shows up. Do i need to import any dll for that ?
Well, the property is .SelectedCells. Please make sure that you are using the newer .dll file. The property is added into the lastest component. I think you may try the following:
Please remove the reference of the previous Aspose.Cells.dll file and add reference to the newer Aspose.Cells.dll file (Which Warren has posted in this thread) into your Solution Explorer window.
The scroll bar comes but still it compresses all the items in the list and do not show the text nicely. Please find attached the excel sheet
I think you may increase the height of the list box and your the contents of the list box will be shown precisely.
I do not wish to increase the size of the listbox , though i want the text to be visible . Right now all the list items are overwriting each other. and the scroll bar appears in the side but does not give the scrolling facility, rather compressing the list inside to fit in the given space.
Please tell how to enable the scroll bar facility.
Please write the solution code in VB.NET and not C#
You should increase the height of the list box and the contents of the list box will be shown precisely. We will also check to enhance the control soon.
We did some amendment work to support the successful installation on Windows Vista which require to use .NET framework 1.1 setup project. We will soon provide the supported .MSI so that you may not have to be installed the .NET 1.1 version. I think till then you can utilize Aspose.Cells.dll library, just add reference to the .dll in your vs.net project and use it (you may get the latest fix (4.4.1.3) from the recent forum posts) .
Please try the attached Aspose.Cells.dll.
Thank you.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.