If I set a sufficiently long label for any kind of form element, or the title of a FieldSet, it just grows horizontally forever if I set labelAlign to right. How can I force these to wrap to the next line instead of creating horizontal scrollbars?
You will need to override the default CSS which forbids wrapping (white-space: nowrap). This should do the job:
.x-form-fieldset-title,
.x-form-label {
white-space: normal;
}
Example:
I think using the labelWidth property for a field will give you the desired result.
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;
}
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);
I have a button in AngularJS. It's in a row of other buttons. How can I show and hide this button but still have it use space? I tried using ng-show but then when the button is hidden it uses no space and all the other buttons around it move.
In your CSS, target the element like this:
.my-element.ng-hide {
display: block!important;
visibility: hidden;
}
(You might want inline-block or something else for the display, the important part is to override the none default value of ng-hide)
You can then use ng-show="showMyElement" as an attribute as per usual
The cycle button has some empty space in front of the text they show, probably because the menu items can have icons, is it possible to remove it?
Either display:none the "x-btn-icon" for the control, or use the "iconAlign" property inside of your config to move the icon div to the right of the control label.
Apply css to solve the problem,
{
white-space: normal;
}
Thanks
I have multiple <apex:pageblock>s in an <apex:panelgrid>. The title of the <apex:pageblock>s wraps prematurely, and I can't figure out why. Here's an example of what it looks like.
I don't seen any reason why the title shouldn't span the entire width of the <apex:pageblock>. Anyone else? I'm also open to hacks to get around the issue.
Salesforce wraps the title in a <td> and sets its width to 30%. You can override this with some css like
td.pbTitle {
width: 60%;
}
I'd ditch the standard title="title text" and go with the same font/size/bold text with a min-width style to protect it from wrapping prematurely.