2014-11-15 9 views
6

JavaFX दृश्य बिल्डर में पुस्तकालय में खोज करने के लिए एक पाठ क्षेत्र है:JavaFX खोज पाठ फ़ील्ड

enter image description here

यह डिफॉल्ट नियंत्रण है (यदि ऐसा है तो मैं इसे नहीं मिल सकता है) या वे बस किया था एक पाठ क्षेत्र शैली?
मैंने दृश्य बिल्डर के स्रोत कोड को भी देखने की कोशिश की, लेकिन इसे नहीं मिला।

+0

मैं भी रुचि बना सकते हैं:

उदाहरण के लिए अगले कोड देखें। क्या आपको कोई उदाहरण मिला? –

+0

कोई नमूना कोड या ट्यूटोरियल है? – Zcon

उत्तर

0

इस तरह से काम करने के लिए कोई प्रीमियर नियंत्रण नहीं है, लेकिन आप टेक्स्टफिल्ड घटनाओं का उपयोग करके एक बना सकते हैं। AutoComplete ComboBox in JavaFX

0

हम अपने उपकरण पट्टी like this

<ToolBar prefHeight="40.0" prefWidth="349.0" > 
     <items> 
      <Button fx:id="buttonCloseSearch" styleClass="buttonSearchClose"> 
       <graphic> 
        <FontAwesomeIconView styleClass="buttonSearchCloseIcon" /> 
       </graphic> 
      </Button> 
      <CustomTextField styleClass="searchField"> 
       <left> 
        <Label styleClass="searchBoxLabel"> 
         <graphic> 
          <FontAwesomeIconView styleClass="searchBoxLabelIcon" /> 
         </graphic> 
        </Label> 
       </left> 
      </CustomTextField> 
      <Button fx:id="buttonUpSearch" styleClass="buttonUpSearch"> 
       <graphic> 
        <FontAwesomeIconView styleClass="buttonSearchUpIcon" /> 
       </graphic> 
      </Button> 
      <Button fx:id="buttonDownSearch" styleClass="buttonDownSearch"> 
       <graphic> 
        <FontAwesomeIconView styleClass="buttonSearchDownIcon" /> 
       </graphic> 
      </Button> 
     <Label text="1 of 2 matchs" /> 
     </items> 
    </ToolBar> 

.buttonSearchCloseIcon { 
 
    -glyph-size: 15; 
 
    -glyph-name: CLOSE; 
 
} 
 

 
.buttonSearchUpIcon { 
 
    -glyph-size: 15; 
 
    -glyph-name: CARET_UP; 
 
} 
 

 
.buttonSearchDownIcon { 
 
    -glyph-size: 15; 
 
    -glyph-name: CARET_DOWN; 
 
} 
 

 
.buttonSearchClose, .buttonUpSearch, .buttonDownSearch { 
 
    -fx-background-color: transparent; 
 
    -fx-background-insets: 0; 
 
} 
 

 
.searchBoxLabel { 
 
    -fx-padding: 0 2 0 7; 
 
} 
 

 
.searchBoxLabelIcon { 
 
    -glyph-size: 13; 
 
    -glyph-name: SEARCH; 
 
}

संबंधित मुद्दे