Hi,
Can anyone help me to find how to set ISsizewithCell and IsMovewithcell property in combo box.It would be great if you update us as soon as posible
Thanks ,
Zakeer.
Hi,
Can anyone help me to find how to set ISsizewithCell and IsMovewithcell property in combo box.It would be great if you update us as soon as posible
Thanks ,
Zakeer.
Hi,
I think you might be talking about Placement property to set it for any any value i.e. “Move, MoveAndSize, FreeFloating etc.” for the combo box shape. See the following sample code for your reference:
Sample code:
//Create a new Workbook.
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook();
//Get the first worksheet.
Worksheet sheet = workbook.Worksheets[0];
//Get the worksheet cells collection.
Cells cells = sheet.Cells;
//Input a value.
cells[“B3”].PutValue(“Choose Dept:”);
//Set it bold.
cells[“B3”].GetStyle().Font.IsBold = true;
//Input some values that denotes the input range
//for the list box.
cells[“A2”].PutValue(“Sales”);
cells[“A3”].PutValue(“Finance”);
cells[“A4”].PutValue(“MIS”);
cells[“A5”].PutValue(“R&D”);
cells[“A6”].PutValue(“Marketing”);
cells[“A7”].PutValue(“HRA”);
cells[“A8”].PutValue(“A”);
cells[“A9”].PutValue(“B”);
cells[“A10”].PutValue(“C”);
cells[“A11”].PutValue(“D”);
cells[“A12”].PutValue(“E”);
cells[“A13”].PutValue(“F”);
//Add a new combo box.
Aspose.Cells.Drawing.ComboBox cmb = sheet.Shapes.AddComboBox(2, 0, 3, 0,20, 50);
//Set the placement type.
cmb.Placement = PlacementType.MoveAndSize;
//Set the linked cell.
cmb.LinkedCell = “A1”;
//Set the input range.
cmb.InputRange = “A2:A13”;
//Set the box with 3-D shading.
cmb.Shadow = true;
//Saves the file.
workbook.Save(@“e:\test2\cmbbox1.xls”);
Thank you.
Hi Amjad ,
Thanks for the code. It was the same which i expected.
Regards,
Zakeer.