I'm creating a textarea and an htmleditor using SceneBuilder, so when I run the project it appears without styling, searching the javafx css guide it doesn't show how to style an htmleditor.
I have two questions:
How to style an HTMLEditor?
Pressing the right mouse button inside the HTMLEditor and the TextArea shows the options to copy, paste, cut and others, but without styling. How can I style that option box?
HTMLEditor:
HTMLEditor copiar,pegar.. :
TextArea copiar,pegar... :
Related
How can I change JavaFX alertbox background without using css strings?. I mean something like Node.setStyle(-fx-background-color: red;)
Using Qt 5.10, Qt Quick2 2.10, Qt Quick Controls 2.3 Button class, I have defined a button that displays an icon and a button that displays text as follows:
Button {
iconSource: "my_button.png"
enabled: sometimes
}
Button {
text: "My Button"
enabled: sometimes
}
I would like the icon button to behave just like the text button below it for user interaction. It should change its appearance appropriately when it is in the click, hover, or disabled state.
Hover and click mode are working, since they only rely on changing the icon background, and not the icon image itself.
Disabled mode is not working. The button displaying text behaves correctly (the text and the border turn gray), but in my icon button, nothing changes when it is disabled.
Details about my icon file:
The RGB values are all black (#000000) corresponding to the color I want my icon drawing to be. The image shape is drawn in the alpha channel. I have tried playing around with the other channels, but I have not had success.
Here is an image from my project. You can see a row of icon buttons on top, and three text buttons below. Although some of the icon buttons are disabled, they all look the same.
I have cleaned up this question. Maybe should not have posted a question the day after St. Patrick's Day :)
The Qt docs for the Button class instruct you to set the iconSource property to define the url for the icon image file. However, this is for QtQuick 1.4.
QtQuick 2.3 does not appear to have documentation yet, though it is the standard for the current Qt 5.10.
The Button (Controls.2/Button.qml) inheritance list is:
QQuickItem
QQuickControl
Templates.2/QQuickAbstractButton
Templates.2/QQuickButton
Button or {Style}/Button
There is no longer any iconSource property in Button. Instead, you access the icon property of QQuickAbstractButton, which is of type QQuickIcon. Using icons in Qt Quick 2 is documented here - Icons in Qt Quick Controls 2 -, along with.. a Button example!
Since the parent classes of Button use prototype inheritance, it seems that the properties of the parents, such as "icon" are available in the Button class as well. You can look in the qml directories in the Qt installation directory to see the class declarations without downloading the whole Qt source code.
So, my new Button code looks like this:
Button {
icon.source: "my_button.qml"
icon.color: enabled ? "#000000" : "888888"
enabled: sometimes
}
Note: I am using the Fusion style, but this does not affect the existence of the icon property, which is inherited from a prototype.
I am using gwt 2.4. And I am not using uibinder.
I have a button which has a background image. when I place mouse on this button it should display a text saying "submit" . The kind of text which says what the button does.
Button is a UIObject and so you can use setTitle method on a Button to set the tooltip.
Or if you want to do something else on mouse over. Just make use of the mouse handlers.
Read Button documentation for more details.
I've been using Qt for some times, but I'm quite new to layouts. I would like to create a dialog with a QTextEdit inside, and the QTextEdit would resize to fill the whole dialog. How can I use layouts to do that? Or is there some other technique that I'm missing?
I have tried adding a layout to the dialog, then put the QTextEdit inside. However, I cannot find any property to make the layout fit the whole dialog.
After adding the text edit to your form, right click on the form and you will see a "Lay out" menu item at the bottom of the context menu, select that and then the layout type you want to use. The designer will create a top level layout of that type for your form and the text edit should now expand to fill the form.
Trying to set the up and down state icons of a Flex Combobox to images. I see the property for changing the color of the icon, but no property to skin it. How can I do this?
The "properties" are actually styles on ComboBase: upSkin, downSkin, overSkin, disabledSkin.
The default is ComboBoxArrowSkin--take a look at the source code to get more details about overriding or customizing it.