moose2004 Posted June 16, 2010 Share Posted June 16, 2010 Is there a way to pass an array of values to a combo box? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 17, 2010 Share Posted June 17, 2010 Do you mean to populate the choices? If so, you can use script to do it. There are functions on the control for clearing the existing items, then adding new ones (which you can do in a simple loop over the array). Link to comment Share on other sites More sharing options...
moose2004 Posted June 17, 2010 Author Share Posted June 17, 2010 So do i need to give the Combo Box a component name and then in the script equal the array to it? Like this: private tmpArr = {'a', 'b', 'c'} Component.ComboBoxName.strContents = tmpArr Link to comment Share on other sites More sharing options...
moose2004 Posted June 17, 2010 Author Share Posted June 17, 2010 Never mind, i got it. Here it is: private string tmpArr = {'a', 'b', 'c'} private x for(x = 0, x <= NumRows(tmpArr) - 1, x++) component.ComboBoxName.AddChoice(tmpArr[x], tmpArr[x]) endfor One more question. After i select a value in the Combo Box, the value font size is bigger then the Combo Box field(part of the text is cut off). How do i change the font size setting of a Combo Box? Link to comment Share on other sites More sharing options...
AzeoTech Posted June 17, 2010 Share Posted June 17, 2010 Don't forget to clear the existing choices before adding! You can't adjust the combo font. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.