]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IComboBox.java
1. Change ToolCode from text field to drop down list, and user can enter their custom...
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / common / ui / IComboBox.java
index 13d7771e3a89399c02128be5eaa8ecfe2d44de31..bba08664bb2c85449c6c79ad90046b797a504cd6 100644 (file)
@@ -92,7 +92,8 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
         this.addKeyListener(this);\r
         this.getEditor().getEditorComponent().addKeyListener(this);\r
         this.getEditor().getEditorComponent().addFocusListener(this);\r
-        this.setToolTipText("Double Click to add an entry and finished by press ENTER. Press DELETE can remove selected entry.");\r
+        this.setToolTipText("<html>Double Click to add an entry and finished by press ENTER. <br>"\r
+                            + "Press DELETE can remove selected entry.</html>");\r
     }\r
 \r
     public void keyPressed(KeyEvent arg0) {\r
@@ -122,6 +123,7 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
                 }\r
                 this.setEditable(false);\r
             }\r
+\r
             if (arg0.getKeyCode() == KeyEvent.VK_ESCAPE) {\r
                 closeEdit();\r
             }\r
@@ -160,7 +162,6 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
             this.setEditable(true);\r
             this.getEditor().setItem("");\r
         }\r
-\r
     }\r
 \r
     public void mouseEntered(MouseEvent arg0) {\r
@@ -190,8 +191,5 @@ public class IComboBox extends JComboBox implements KeyListener, MouseListener,
     private void closeEdit() {\r
         this.setEditable(false);\r
         this.getEditor().setItem("");\r
-        if (this.getItemCount() > 0) {\r
-            this.setSelectedIndex(0);\r
-        }\r
     }\r
 }\r