uicontrols : fix focusRequest on EditBox 86/15286/3
Antoine ELIAS [Mon, 29 Sep 2014 07:28:29 +0000 (09:28 +0200)]
u1 = uicontrol("style", "edit", "position", [10, 10, 200, 40]);
u2 = uicontrol("style", "edit", "position", [10, 50, 200, 40]);

uicotrol(u1); //set focus on 1st editbox
uicotrol(u2); //set focus on 2nd editbox

Change-Id: I41dacf9f2b9bcc077ab607aa8e7d50ac0d6fc714

scilab/modules/gui/src/java/org/scilab/modules/gui/bridge/editbox/SwingScilabEditBox.java

index 7fa6567..a63659f 100644 (file)
@@ -695,4 +695,9 @@ public class SwingScilabEditBox extends JScrollPane implements SwingViewObject,
             setForeground(color);
         }
     }
+
+    public void requestFocus() {
+        super.requestFocus();
+        textPane.requestFocus();
+    }
 }