extras/gui/genericEditor: Larger editors for DataList/IdList/MultiLineString
[sdk] / extras / gui / genericEditor.ec
index a2dcc89..b631c9b 100644 (file)
@@ -37,13 +37,19 @@ class GenericEditor : Window
          {
             if(strcmpi(f.name, "ID"))
             {
-               FieldDataBox box { editor = editor, field = f, text = f.name, size = { 200, 20 }, position = { 20, y + 16} };
+               int h = 20;
+               FieldDataBox box { editor = editor, field = f, text = f.name, size = { h = h }, anchor = { left = 20, top = y + 16, right = 20 } };
                Label label { editor.editArea, position = { 20, y }, labeledWindow = box };
+               if(eClass_IsDerived(f.type, class(DataList)) || eClass_IsDerived(f.type, class(IdList)) || eClass_IsDerived(f.type, class(MultiLineString)))
+               {
+                  h = 70;
+                  box.size.h = h;
+               }
                incref box;
                incref label;
                dataBoxes.Add(box);
                labels.Add(label);
-               y += 40;
+               y += 20 + h;
             }
          }
       }