I've been trying to adjust the height of my combo field. I have tried several different methods, including setting config properties on the combo and its container, tweaking css, and using css mixins. So far, I have had no effect on the height of the combo.
I'm using Ext 6 and the Triton theme.
Specifically, I want the combo box (in certain situations) to look just as it does out-of-the-box, except less white space around the value in the textfield, thus making the label and textfield consume less vertical space.
Related
The problem is that some properties of the react-phone-number2 input are not styled, for example, we cannot change the scrollbar, since not all of its properties are styled, it is also not clear how to make a dropdown with strange ones so that it adapts to the width of the input and is not hardcoded as it goes on absolute.
Exapmple:
https://codesandbox.io/s/react-phone-input-2-forked-jk0gmt?file=/src/styles.css
So, my question is how style scroll for react-phone-input-2 and how make country dropdown
width adaptive for input width
I am trying to get a result looking like this (picture taken from https://material.google.com/components/tabs.html#tabs-usage):
I don't want the tabs to take 100% of the width of the page, as it is by default with material-ui. Is it possible to do this with the implementation of material-ui ? I already played with the width of each tab using the style tab property, but the inkbare seems hardcoded to use percentages according to the id of the selected tab, and therefore doesn't underline properly the resized tabs. Is there a workaround?
There is an issue related to this problem https://github.com/callemall/material-ui/issues/1203
But yes, there is an easy workaround. (unfortunately it doesnt support diffrent widths across the tabs).
You can use the Tabs tabItemContainerStyle property to set the width of the tabs container (make it the width you want to each tab times the number of tabs).
Since the background color is setted on that element, you're gonna need to override the styles for two others Tabs properties (style and contentContainerStyle).
In this example Im setting the same color as my tabs in the style property (for the whole component) and setting the contentContainerStyle back to a white background.
You could use the classes properties as well..
Ex: (Imagine you have a blue toolbar)
<Tabs
tabItemContainerStyle={{width: '400px'}}
style={{background: 'blue'}}
contentContainerStyle={{background: '#FFF'}} >
When I press a button, my app displays a calendar (within a Dialog) that slides from the bottom of the screen:
I want the Calendar to occupy the whole width of the screen, but it shows some white padding on both sides and also on the top and bottom (It is white because the "Dialog" UIID has a white created image as background)
I have tried changing all the UIID related to Dialog: "Dialog", "DialogBody", "DialogTitle", etc. I set all margins and paddings to cero.
How can I get rid of that padding?
Try change both the DialogUIID and the UIID of the dialog. Also make sure your calendars margin values are set to zero. It could be that your calendar is too small. Try placing it in a table layout with 1 row and 1 column then in layout constraints set the width and height to 100%
Open up the Component Inspector tool and traverse the hierarchy. You will be able to see all the components and their UIID's within the hierarchy and you should be able to understand which one of those components contributes to the padding/margin.
I've a GUI built app and I set many Icon images in the code for some components.
The thing is I've made sure all "padding" and "margin" values are the same for the different states of the components (unselected, pressed, etc) but when I try to input data into the TextFields, it seems like the dimensions of some components change without notice and they completely mess with my layout.
Even sometimes some of the icons partially disappear. Please see the following screenshot of before and after text input, where the Container and TextFields shrink
I really don't know what else I can do. I have tried many things, but stil the same outcome. Please help.
You need to make the container housing all this components scrollable.
Use Millimeters for your TextField padding and margin, don't use Screen Percentage. From the image in the images you posted, 2mm top and bottom and 1mm left and right would be suitable.
If the components having those icons are pressable like a button, be sure to set their pressedIcon to the same icon.
Lastly, style your TextField Unselected state and copy this to Selected and Pressed states, to avoid erroneous styling.
A combo's drop-down list gets the size of the Combo, and display of items with longer text just gets cropped.
I tried fiddling with Ext's CSS for combos with no luck.
Does anyone know how it can be done ?
Using ExtJS 3.2.0.
EDIT:
Alternative solutions to improve usability will also be appreciated, e.g. getting the list to expand with the content.
I don't know how you can add a scroll bar, but I know that you can change the list width with the well-named property :
listWidth : Number
The width (used as
a parameter to Ext.Element.setWidth)
of the dropdown list (defaults to the
width of the ComboBox field). See also
minListWidth
For an horizontal scroll, it would need lots of changes, because the list container width is forced, so "overflow" attributes in css are useless.
Edit : Another method
You can add this custom css, for me it seems to work well, as wrapping long lines.
.x-combo-list-item {
white-space:normal;
}
Of course, if you add this it will apply to all combos' lists.
You can set listClass : 'x-combo-list-wrap' on your Ext.form.ComboBox, and then apply the css only to these items :
x-combo-list-wrap .x-combo-list-item {
white-space:normal !important;
}
(I'm not sure the !important is useful here, not tested)