as3 颜色选择器.colors 属性
as3 colorPicker .colors property
我使用 colorchecker 组件为儿童绘画应用程序做了一个单独的 colorchecker。
我将 swatchWidth 设置为更大的值,并在 .colors 数组中添加了 20 种颜色。现在颜色选择器在一行中显示这些颜色。嗯嗯。
是否可以设置行数或每行的最大颜色?有解决方法吗?
问候
只需设置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);
我使用 colorchecker 组件为儿童绘画应用程序做了一个单独的 colorchecker。
我将 swatchWidth 设置为更大的值,并在 .colors 数组中添加了 20 种颜色。现在颜色选择器在一行中显示这些颜色。嗯嗯。
是否可以设置行数或每行的最大颜色?有解决方法吗? 问候
只需设置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);