as3 colorPicker .colors property

183 views Asked by At

I did an individual colorchecker for a child painting app using the colorchecker component.

I set the swatchWidth to a bigger value and added 20 color in an .colors array. now the colorpickers shows these color in one row. hmmm.

is it possible to set the number of rows or maximal color per row? is there a workaround? regards

1

There are 1 answers

0
Andre Lehnert On BEST ANSWER

Just set columnCount...

colorPicker.setStyle('columnCount', 5); 
colorPicker.setStyle('swatchWidth', 20); 
colorPicker.setStyle('swatchHeight', 20); 
colorPicker.setStyle('swatchPadding', 5); 
colorPicker.setStyle('backgroundPadding', 5); 
colorPicker.setStyle('textPadding', 5);