在一个NativeScript-Angular
应用中,我正在尝试设置RadDataForms
TKPropertyEditor
的样式。对于iOS上的“步进器编辑器”,我想增加控件和显示值之间的距离,但是找不到找到它们的方法。
我正在使用nativescript-ui-dataform: 4.0.0
。
<TKEntityProperty tkDataFormProperty name="grade"
displayName="Bewertung (1 – 10)" index="1">
<TKPropertyEditor tkEntityPropertyEditor type="Stepper">
<TKPropertyEditorParams tKEditorParams minimum="1" maximum="10"
step="1"></TKPropertyEditorParams>
<TKPropertyEditorStyle tkPropertyEditorStyle valuePosition="Left">
</TKPropertyEditorStyle>
</TKPropertyEditor>
</TKEntityProperty>
答案 0 :(得分:0)
请参阅高级样式examples here,您可以直接修改本机对象以设置元素样式。
public editorSetupStepperIOS(editor) {
editor.valueLabel.textColor = colorDark.ios;
const coreEditor = <UIStepper>editor.editor;
coreEditor.tintColor = colorLight.ios;
for (let i = 0; i < coreEditor.subviews.count; i++) {
if (coreEditor.subviews[i] instanceof UIButton) {
(<UIButton>coreEditor.subviews[i]).imageView.tintColor = colorDark.ios;
}
}
const editorView = editor.editorCore;
editorView.labelAlignment = TKGridLayoutAlignment.Left;
}