my requirement is to have colours in combo box instead of textual value as "RED", "GREEN" in dropdown. am trying to achieve this using EXTJS 4.2. Could any one please help me how to configure the combobox.
is there any way to add colour images as values to combobox.
You should use listConfig config to change the behaviour of combobox picker. (For more information: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.form.field.ComboBox-cfg-listConfig)
Perhaps you give the combobox element a css class (e.g. 'foo'), or style tag, and then set the background-color with CSS
.foo{
background-color: red
}
It can be done by setting 'background-color: color; background-image: none;'
Take look at this expamle
Related
Is it possible to change the width of a row? I have some rows with JSON data. It would be best to display them in a <pre> tag so that the user can view it naturally, but this seems to be impossible.
So now I'm wondering is it possible to remove the default overflow-x: hidden? And to just let the user scroll to the end of a row? Instead of the text just having 3 dots at the end, because there's a max-width.
In the data-grid css api they show the necessary classes which could be overridden, and at the end they say:
You can override the style of the component thanks to one of these customization points
...
So you could add the following style rule to override the default one :
.MuiDataGrid-root .MuiDataGrid-cell {
text-overflow: initial;
overflow-x: auto;
}
I am creating a treeview using
kendo.data.HierarchicalDataSource
I want to remove these highlighted border. It is there only when using treeview.
Thanks.
Try overwriting the following style using !important. I overwritten it with red color, you can change it to any color of your choice.
.k-state-selected,
.k-state-selected:link,
.k-state-selected:visited,
.k-tool.k-state-selected
{
color : #ffff;
background-color:#ff0000!important;
}
Sample dojo
There is simple form and some textfields on this form. I have to set colors
(background and font) in two of them on runtime.
I tried to do it two ways:
1) fieldInstance.addClass('aaa') with css like this
.aaa .x-form-field {
background-color: black;
color: red;
}
2) fieldInstance.setFieldStyle('font-weight: bold;color: red;background-color: black;');
both methods are working because I see the bottom age of both is
fields is thick in black color, and both fields are working the same (almost) way.
Before enter and after exit background color is white.
When I start to edit this fields, background of first
is always white, background of the second is black until
I leave the field.
Could you explain me whats wrong?
For <input> element applied many classes beside x-form-field, like x-form-text and some of them define color and background-color aswell. So I guess that some of that classes may be more specific than .aaa .x-form-field. Try to use !important within your CSS rules:
.aaa .x-form-field {
background-color: black !important;
color: red !important;
}
I think that the 1st function append a class to the Others already presents.
In the second case you replace values of style already setted.
Maybe to have the same issue you need to modify the x-form-field fields, instead of append Others.
I Always use the second option if i have to modify style on Runtime.
maybe posting other code i can see better where the problem could present
In Angular js ui rid, how can I remove vertical and horizontal scrollbars ?
And also for each column heading I am getting a little carrot icon by default, which shows sort ascend, sort descent, Hide column. I want to remove this also from my column headings.
Instead .table-striped which comes by default for ui grid, I want to use .table-bordered. Is there any place to set these parameters to ui grid?
enableHorizontalScrollbar : 0,
enableVerticalScrollbar : 0,
enableSorting : false,
enableColumnMenus : false;
Good answer from #Asqan answering the first part of your question. For the second part:
Instead .table-striped which comes by default for ui grid, I want to use .table-bordered. Is there any place to set these parameters to ui grid?
I'm thinking you mean you want the look in this plunker I created.
You can solve these css issues in one of two general ways.
1) Customize the ui-grid css
2) Leave the original ui-grid css then override it in your own css file
I've shows the first option to solve your "stripped" issue and the second option to implement your desired border. I have done both for example only so you can see both options - I recommend choosing and using consistently one method or the other.
The ui-grid sets the ".table-striped" look to which you are referring in the css. You can override this either in you own css file or using the customizer tool and setting the #rowcoloreven and #rowcolorodd fields to the hex code for white #ffffff. This will update the ui-grid css to contain the below:
.ui-grid-row:nth-child(odd) .ui-grid-cell {
background-color: #ffffff;
}
.ui-grid-row:nth-child(even) .ui-grid-cell {
background-color: #ffffff;
}
For ".table-bordered" see specifically in the style.css file these added lines
.ui-grid-cell {
border-style: solid;
border-bottom: 1px #ff0000;
}
is there a way to change the size of a checkbox in JavaFx 8? The default size is pretty big and I found no way to change it, not with css nor by using the API of the checkbox control itself.
If you want to change the box's size of the CheckBox,you can use:
.check-box > .box {
-fx-padding: 10px;
}
and you also want to change the check mark,you can use:
.check-box > .box > .mark {
-fx-padding: 10px;
}
with the above css you can get a preview
All the javafx's built-in css selectors are in com/sun/javafx/scene/control/skin/caspian/caspian.css of jfxrt.jar
Hey you could use the padding to achieve that.
Here is an example with radiobuttons.
Javafx 2.0 : How to change the size of the radio-buttons circle with CSS?
Should be the same in JavaFX 8 since its done with css
The CheckBox class provides several methods to set the size. .setPrefSize() takes two doubles that set the preferred width and height.
CheckBox box = new CheckBox();
box.setPrefSize(prefWidth, prefHeight);