Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

implementing Toggle in javafx ComboBox

MuzibJun 16 2017 — edited Jun 19 2017

While using SolidWorks 2013, I came across this type of ComboBox which also operates as a ToggleButton:

img1.pngimg2.png

I was wondering if I can somehow create such Toggle-ComboBox.

After a little research, I found that I have 3 options:

  1. Using a SplitMenuButton.

    img3.png

    This option has numerous propblems, such as, it doesn't have a value property.

    That creates a problem because the caption never changes with the action of MenuItems.

  2. Using a ComboBox setting the property 'editable' to true, which looks like this:

img4.png

   But it's problem is that, in the 'Button cell', there is a TextField, which I really don't want.
  1. Making my own custom control for this.

Now, is there anything I can do with the first two options? That will be better. If not, what will be the best way to create a custom one?

This post has been answered by bouye-JavaNet on Jun 18 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 17 2017
Added on Jun 16 2017
2 comments
471 views