Aspose Excel Dropdown(Combobox) height

I’m generating Excel in which multiple dropdown gets created with dynamic range. i want Vertical scroll bar inside combobox. How will i have that functionality )(With c# code) ?

Please my Code and attached image: (InputRange can be dynamic)vertical scroll.png (8.9 KB)

Aspose.Cells.Drawing.ComboBox cb = null;
cb = worksheet.Shapes.AddComboBox(7, 0, 1, 0, 20, 160);
cb.InputRange = “Sheet1!A1:A2”;

@sdtechsupport.sirius,

Thanks for the screenshot with details.

Please add a line to your code segment:
e.g
Sample code:


//Set no. of list lines displayed in the combo
//box’s list portion. This will ensure vertical scrollbar inside combobox.
cb.DropDownLines = 5;.

Hope, this helps a bit.

Thanks for reply…

I have already added that line(DropDownLines = 5). Though it doesn’t show vertical or horizontal scroll bar inside dropdown.

Please suggest…

@sdtechsupport.sirius,

Please try using our latest version/fix: Aspose.Cells for .NET v17.9 (if you are not already using it).

If you still find the issue, kindly do create a simple console application (runnable), zip the project and post us here, we will check it soon.

Thanks… i will try will the latest version and will get back to you with sample console application if it doesn’t work.

Thanks again for quick support.

Hi,

I have tried with latest version (17.9) but still its not giving me desired result.

I Can see verical scroll bar inside dropdown but not horizontal. I can not see full horizontal text inside dropdown .

Please find attached image. Horizontal scroll inside dropdown excel aspose.png (17.1 KB)

With below line of codes i’m generating dynamic dropdown inside excel with aspose.

ComboBox cb = null;
cb = ws.Shapes.AddComboBox(7, 0, 1, 0, 20, 160);
cb.InputRange = “Sheet1!J1:J150”;

Please suggest …

@sdtechsupport.sirius,

Thanks for the screenshot.

I think this (horizontal scrollbars attached to combo box control) is not supported even in MS Excel either. I tried to accomplish the task in MS Excel manually but I could not find horizontal scrollbars attached with the list portion of the combo box control. Aspose.Cells follows MS Excel standards and specifications when creating or rendering controls, so this may not be supported. If you are successful to attach horizontal scrollbar with the combobox control in MS Excel manually, kindly save the file and provide us here with the steps details, we will check on how to do it via Aspose.Cells APIs.