Add wide string support for settings

This commit is contained in:
John Lewin 2018-01-18 17:03:05 -08:00
parent 9b786ad2be
commit f4de08a2aa
4 changed files with 16 additions and 9 deletions

View file

@ -670,6 +670,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
break;
case SliceSettingData.DataEditTypes.STRING:
case SliceSettingData.DataEditTypes.WIDE_STRING:
uiField = new TextField();
break;
@ -742,6 +743,12 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
uiField.Name = $"{settingData.PresentationName} Field";
uiField.Initialize(tabIndexForItem++);
if (settingData.DataEditType == SliceSettingData.DataEditTypes.WIDE_STRING)
{
uiField.Content.HAnchor = HAnchor.Stretch;
placeFieldInDedicatedRow = true;
}
uiField.SetValue(sliceSettingValue, userInitiated: false);
uiField.ValueChanged += (s, e) =>