Added multi-line text
fixed more tests
This commit is contained in:
parent
569e316f38
commit
aebb0ff868
6 changed files with 595 additions and 41 deletions
|
|
@ -1068,19 +1068,23 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
}
|
||||
else if (propertyValue is StringOrExpression stringOrExpression)
|
||||
{
|
||||
// create a string editor
|
||||
var field = new TextField(theme);
|
||||
// create a a multi-line string editor
|
||||
var field = new MultilineStringField(theme);
|
||||
field.Initialize(0);
|
||||
field.SetValue(stringOrExpression.Expression, false);
|
||||
field.ClearUndoHistory();
|
||||
field.Content.HAnchor = HAnchor.Stretch;
|
||||
field.Content.Descendants<ScrollableWidget>().FirstOrDefault().MaximumSize = new Vector2(double.MaxValue, 200);
|
||||
field.Content.Descendants<ScrollingArea>().FirstOrDefault().Parent.VAnchor = VAnchor.Top;
|
||||
field.Content.MinimumSize = new Vector2(0, 100 * GuiWidget.DeviceScale);
|
||||
field.Content.Margin = new BorderDouble(0, 0, 0, 5);
|
||||
RegisterValueChanged(field,
|
||||
(valueString) => new StringOrExpression(valueString),
|
||||
(value) =>
|
||||
{
|
||||
return ((StringOrExpression)value).Expression;
|
||||
});
|
||||
rowContainer = CreateSettingsRow(property, field.Content, theme, rows);
|
||||
rowContainer = CreateSettingsColumn(property, field, fullWidth: true);
|
||||
}
|
||||
else if (propertyValue is char charValue)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue