CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2019
    Location
    Java 1.8
    Posts
    12

    Can I hide the 'carrot' caused by the JavaFX ComboBoxListViewSkin on a ComboBox?

    Java SE v. 1.8.0 / Intellij IDE

    Can I hide or remove the 'carrot' (upside down triangle) from a JavaFX ComboBox caused after implementing the ComboBoxListViewSkin class (see pic below)?

    The ComboBoxListViewSkin class was implemented as part of an AutoComplete method to manage and consume the [SPACE] character in the JavaFX ComboBox though the class's getPopupContent().addEventFilter. After implementing, it adds the 'carrot' in the upper left corner of the JavaFX ComboBox.

    I'm a little naive about such things. I was hoping someone may know how I could hide or remove it. I'm not sure what it even indicates. I've messed with a few class methods but I haven't been able to figure it out. I haven't worked little or not at all with CSS, so I wasn't sure if that was also a more likely solution. Any thoughts welcome.

    Thanks!

    Name:  ComboBoxCarrot.JPG
Views: 577
Size:  12.8 KB

    The implementing code, to help demonstrate what I'm doing.
    Code:
    cbSkin = new ComboBoxListViewSkin(cmb);
    cbSkin.getPopupContent().addEventFilter(KeyEvent.KEY_PRESSED, (event) -> {
                if(event.getCode() == KeyCode.SPACE){
                    filter += " ";
                    event.consume();}
    });

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Can I hide the 'carrot' caused by the JavaFX ComboBoxListViewSkin on a ComboBox?

    What does the variable comb represent?

  3. #3
    Join Date
    Jan 2019
    Location
    Java 1.8
    Posts
    12

    Re: Can I hide the 'carrot' caused by the JavaFX ComboBoxListViewSkin on a ComboBox?

    Quote Originally Posted by Arjay View Post
    What does the variable comb represent?

    Hi Arjay! I did reply to you comment from my phone but apparently it didn't go through. "cmb" represents the ComboBox in which the ComboBoxListViewSkin manipulates the popup.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured