#46 StretchLayoutManager working
[fanfix.git] / src / jexer / TLabel.java
index 1d65976bba16f3947a3c47498cf552dcdda4f849..0c62250ec79b3cd3cfa6af0307c34f7caeac8b86 100644 (file)
@@ -170,6 +170,17 @@ public class TLabel extends TWidget {
     // TWidget ----------------------------------------------------------------
     // ------------------------------------------------------------------------
 
+    /**
+     * Override TWidget's height: we can only set height at construction
+     * time.
+     *
+     * @param height new widget height (ignored)
+     */
+    @Override
+    public void setHeight(final int height) {
+        // Do nothing
+    }
+
     /**
      * Draw a static label.
      */
@@ -186,8 +197,8 @@ public class TLabel extends TWidget {
             mnemonicColor.setBackColor(background.getBackColor());
         }
         putStringXY(0, 0, mnemonic.getRawLabel(), color);
-        if (mnemonic.getShortcutIdx() >= 0) {
-            putCharXY(mnemonic.getShortcutIdx(), 0,
+        if (mnemonic.getScreenShortcutIdx() >= 0) {
+            putCharXY(mnemonic.getScreenShortcutIdx(), 0,
                 mnemonic.getShortcut(), mnemonicColor);
         }
     }