JavaFX CheckboxMenuItems / CustomMenuItems Trouble - java

I got CheckBoxMenu Items in a Menu to select filters I got. I found out that I can't use setHideOnClick on CheckBoxMenu so I used CustomMenuItem with a CheckBox inside, but now I can only click the box and its text to ckeck the box instead of the whole highlightened field. Is there any way to expand it to the width of the CustomMenuItem?
I got the same Problem like this:
JavaFX MenuItem without autohide
But the solution doesn't work 100% and in a comment there is the same question/problem I have now.
Greets

Related

Website Button does not work in mobile Layout

I have a really weird error that I'm trying to resolve. On a website I built with the visual composer, one of the buttons that leads to an internal anchor (#whatwedosmall) on the same site just wont work on the mobile layout.
This is the site: https://b8j3ssh.myraidbox.de/
I created 3 layouts (large, medium, small) and each section has a certain ID (for example the What we do section in large is named: #whatwedolarge and so on. Within the site there are buttons that lead to these sections and it works great!
However, the very first button on mobile (breakpoint smaller than 600px) just wont work at all. I tried everything but I cannot get it to work...
Can you help me?
When you inspect the page at a breakpoint < 600px you can see that your button (actually an ) is being covered by the rev_slider_1_1 so the actual can never be hovered or clicked.
If you delete that slider from the DOM in DevTools or set the height manually, then the hovering and click work. As you can see in the screenshot below, manually setting the Slider height to 850px allows me to hover and click
You need to determine how the height of that slider is being determined and fix that in your code.

Jcombobox with Jcheckboxes

how can I create (with JAVA) Combobox that contains Checkboxes for multiple selection and display the selected items in the Combobox like this picture:
click to see the pic
and thnx for advance.
EDIT:
I found this API (JAPURA API) and it's great but when I select multiple things I want to display the selected items instead of "* multiple items *".
Here's the link to achieve your goal:
JComboBox Providing a Custom Renderer
I would suggest you create a JButton and style it in the form of a Combobox if you want that.
Then, at the onclick function (actionperformed), you create a JPanel and make it visible under the button. In the panel, you can put whatever you want, so you just put checkboxes there.
I know this is kind of a workaround of your problem, but it should be easy for you to do so, and the actual user does not see a difference at all.
Hope I could help you.
Cheers,
Lucky

Codename one create radio button using codenameone designer

How do you get around using codenameone designer to make a functional radio button. I have tried to create in on my form and made properties to be:
UIID: RadioButton
Icon: radioEmpty.png
PressedIcon: radioFull.png
Toggle: [checked]
it still will not work like a radio button, is there something am missing or what am I doing wrong. Please help. Thank you.
You need to define more than one radio button and set them all to the same group name.

TabFolder with single item on OS X

I created a tab folder with one tabitem. When i execute this ui on mac it does not show me the title of tab item properly. If i create two or more tab item then its all titles are visible. I executed this code on windows there is not any problem with it.
I tried to search on google for the same but not have satisfied answer or solution.
If any body can solve this by giving proper justification.
Thanks.
Don't create a single-item tab folder or, if it really should look like a tab, try CTabFolder.

JFace CTabFolder, toggle between tabs

I'm working on an app in JFace. So I have a CTabFolder with a number of CTabItems in it. What I would like is to be able to automatically switch to display an arbitrary CTabItem.
What I'm thinking is something like:
CTabFolder myFolder = FolderFactory.newFolder();
myFolder.showItem(myFolder.getItem((ARBITRARY_INT)));
/*These don't help!*/
//myFolder.update();
//myFolder.pack();
//myFolder.redraw();
The folder works just fine by itself. i.e. users may tab through with the mouse. The difference is that I would like to be able to show different tabs by default in different perspectives.
Any thoughts?
You need to use CTabFolder#setSelection(..). The show item only shows the item, like if there are a lot of items and some are hidden, this method will scroll to them.

Categories