ecere;gui;controls;DataBox; add support for autosize when editor is derived from...
authorRejean Loyer <redj@ecere.com>
Sat, 9 Nov 2013 11:37:23 +0000 (06:37 -0500)
committerRejean Loyer <redj@ecere.com>
Mon, 11 Nov 2013 18:50:16 +0000 (13:50 -0500)
ecere/src/gui/controls/DataBox.ec

index de490e6..a6efd8c 100644 (file)
@@ -113,16 +113,14 @@ private:
             editor.background = background;
             editor.foreground = foreground;
             editor.opacity = opacity;
-/*#if _DEBUG
-            if(autoSize)
-               PrintLn("DataBox::OnPostCreate -- autoSize == true");
-#endif*/
             if(eClass_IsDerived(editor._class, class(EditBox)))
             {
                ((EditBox)editor).readOnly = readOnly;
                ((EditBox)editor).autoSize = autoSize;
                ((EditBox)editor).clickThrough = true;
             }
+            else if(eClass_IsDerived(editor._class, class(Button)) && autoSize)
+               size = editor.size;
          }
          else
          {