#46 BoxLayoutManager working
[fanfix.git] / src / jexer / TComboBox.java
index 4abdd6fbc7445b89378dffd3ec7e40923d88bec6..2d1b2c07539f1755c88429b4764391a1ee3bde21 100644 (file)
@@ -216,13 +216,19 @@ public class TComboBox extends TWidget {
     // ------------------------------------------------------------------------
 
     /**
-     * Override TWidget's width: we can only set width at construction time.
+     * Override TWidget's width: we need to set child widget widths.
      *
-     * @param width new widget width (ignored)
+     * @param width new widget width
      */
     @Override
     public void setWidth(final int width) {
-        // Do nothing
+        if (field != null) {
+            field.setWidth(width - 3);
+        }
+        if (list != null) {
+            list.setWidth(width);
+        }
+        super.setWidth(width);
     }
 
     /**