extras/gui/genericEditor: Larger editors for DataList/IdList/MultiLineString
authorJerome St-Louis <jerome@ecere.com>
Wed, 9 Dec 2015 23:25:01 +0000 (18:25 -0500)
committerJerome St-Louis <jerome@ecere.com>
Tue, 22 Dec 2015 06:45:10 +0000 (01:45 -0500)
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;
             }
          }
       }