How do I change the complete combobox in JavaFX via CSS - javafx

I created a window in JavaFX Scene Builder and costumized the look via CSS. It works fine but the settings for the combobox doesnt apply for the whole box.
How do I correct this?

Related

Scene Builder button without text

I am trying to make a button with a graphic only, and Scene Builder won't let me clear the text in the button. It automatically reverts to "Button" for some reason. Is there a way to make this stop?
Seems to work fine with JavaFX Scene Builder 8.3.0:

How can I set the title of non-main-windows in an NSDocument application?

I am working on a document-based OSX application, with master-detail style windows. I understand how to open additional windows, to display additional information, by using -makeWindowControllers and adding extra window controllers, but I can't set the title of the new windows. I have tried using -setTitle and -windowTitleForDocumentDisplayName in both Document.m and in my sub-classed window controller class, but I can't get the window title to change.
How do I change the title of non-main-windows, which have a sub-classed window controller, in an NSDocument based application?
EDIT: I know there are some suggestions on SO about using an IBOutlet to the window to do this, but surely the window controller has a reference to its window anyway, right?

flex - cloned ComboBox class - down arrow gone (trying to fix drop off bottom of screen)

I have cloned the ComboBox class in order to fix the problem where a ComboBox at the bottom of a tab expands downwards and disappears off the bottom of the screen. I did this to apply the patch from http://craiggrummitt.wordpress.com/tag/combobox/. I had to copy "../styles/FocusStyles.as" etc into a project folder. also I copied ComboBox.png into a project folder.
The ComboBox does now open upwards, but there is no arrow button on the displayed combo. If I rename [IconFile("ComboBox.png")] to [IconFile("Garbage.png")] I get no error and the code still runs. There is no Garbage.png. Does this mean that the problem is that ComboBox.png displays the arrow button and the new class cannot locate this file, or is this just a red herring? tia.
The IconFile metadata is used by Flash Builder and is unrelated to runtime elements of the component. I'll quote the docs:
Identifies the filename for the icon that represents the component in
the Insert bar of Adobe Flex Builder. For more information, see
IconFile metadata tag.
If there is no arrow button on the ComboBox; it sounds like you may have improperly set the skin, or somehow disturbed functionality with our extension. You'd have to share some code for us to help further.

QML Webview renders SELECT elements with x-offset

I’m currently implementing a WebView which contains a web page with a select form element on the page. Whenever I click on the select box, the dialog containing the possible values is appearing off the page.
The dialog doesn’t centre itself within the WebView or the parent. On the simulator it appears just below the dropdown box on the web page but is too wide to fit on the screen (Obscuring the scrollbar) and on the device it appears in the bottom left hand corner of the screen.
Has anyone got any experience with this? I’m simply using the QML WebView item and it’s not within a Flickable (Which I originally thought would be the issue)
Background and Investigation
Two approaches to rendering this page:
A simple project which uses the Qt QWebview, and running on the simulator gives this:
Note: the select menu is the full width of the window.
With a simple project that uses the following QML:
import QtQuick 1.0
import QtWebKit 1.0
Rectangle {
anchors.fill: parent
WebView {
anchors.fill: parent
url: "http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_option"
}
}
would yield the following results:
What am I doing wrong here? What do I need to do to my QML to make it render the menus properly?
Ok. This feels wrong.
I can't believe there's a story on my board which is "As a Qt user, I can select values from a long list".
So my solution to this was inject a chunk of Javascript into the Webview using evaluateJavascript which crawls the DOM looking for SELECT elements.
When the select is clicked, then call out to QML with the list of options, and then render a QML version of the select box.
The return trip is simpler, but just as unappealing.
I tried added a click or tap listener to the select elements, but the DOM API isn't complete (will try and find a canonical link), and nothing I tried would trigger the handler. In the end, I hid it, and added inserted a button in its place.
There has to be a better way.

Qt QComboBox popup position

I'm working on an application which contains an editable QComboBox. I observe the following behavior when I enter some text in the edit field and press the dropdown arrow in the combobox:
My edit line ends up hidden behind the item "e#abc.com". I would like to have the combobox list popup below the edit field, like in the below screen:
The first screen above is taken on Ubuntu with Qt 4.5 while the second screen is from Suse 11 with Qt 4.4. I'm not aware of any differences regarding change of behavior of QComboBox popups between Qt 4.4 and Qt 4.5. Regardless, I would like the list to behave the same in both distributions.
This is a standard QComboBox with the editable property set to on - there are no stylesheets or special formatting applied to it.
How can I make the list popup below the editable field, like in the second screen?
This looks like a style issue, as the screenshots are taken with different styles. Perhaps you can start investigating by changing style on the failing desktop.

Resources