ZK Hide the Input Field of Datebox - zk

How can I hide the input field of Datebox?
I've tried to set the width to "0px", but the input field still visible.

Do you mean you just want to show the calendar icon?
.z-datebox-input{
visibility: hidden;
}
You can add width:20px to make it smaller.

Related

ag-Grid - show buttons on row hover like in Gmail

In ag-Grid, I want to show action buttons when a row is hovered like in Gmail. The action buttons have to appear at the right end of grid irrespective of scroll position.
There is one approach mentioned at https://blog.ag-grid.com/build-email-client-with-ag-grid-like-gmail/. They have used a cellRenderer on the last column and showed buttons in it when "onCellMouseOver" happens. This approach would work only if the last column (which uses cellRenderer) is always in view. If that column goes out of view, action buttons will also go out of view.
I cannot use this approach since in my case, there are many columns and all columns in my grid do not fit on the screen at the same time. So, there can be any column at the right end depending on scroll position and thus we don't know which column to add cellRenderer on.
How will we achieve this?
Here is a plunk that demonstrates my solution: https://plnkr.co/edit/X4hCimLy6aL3j4eh
It turns out that this can be achieved using just CSS. Here is how I did it:
Add a column for showing action buttons. Use cellRenderer to render buttons in it. Pin it to right.
Using CSS,
absolute position the ag-pinned-right-cols-container to right
hide right header and spacer by setting their width 0
for rows which are not being hovered, hide action buttons cell in them by setting their padding & width 0
Here is complete CSS with explanation:
/* Hide right header and spacer */
.ag-pinned-right-header,
.ag-horizontal-right-spacer {
width: 0 !important;
min-width: 0 !important;
}
/* Add absolute position so that action buttons column will appear on top of other columns.
pointer-events: none to pass on mouse events to behind columns */
.ag-pinned-right-cols-container {
position: absolute !important;
right: 0;
pointer-events: none;
}
/* Reset pointer-events so that click can happen on action buttons */
.ag-pinned-right-cols-container * {
pointer-events: initial;
}
/* Hide border of right-cols-container */
.ag-pinned-right-cols-container .ag-cell {
border: none !important;
}
/* Show action buttons only for the row that is being hovered.
For rows which are not being hovered, hide them by setting their width and padding to 0. */
.ag-pinned-right-cols-container .ag-row:not(.ag-row-hover),
.ag-pinned-right-cols-container .ag-row:not(.ag-row-hover) .ag-cell {
width: 0 !important;
padding: 0 !important;
}
Ag-grid's default row hover and row selected colour has some transparency. Since our action buttons column is placed absolutely over other columns, its background looks darker because of the way those transparent colours blend.
So, it is better to use background colours with no transparency in this method like this:
.ag-theme-alpine {
--ag-row-hover-color: hsl(207, 90%, 94%);
--ag-selected-row-background-color: hsl(207, 87%, 86%);
}
Overall,
Pros:-
It's a drop-in solution. You can just drop above CSS in your code and you will get the button on hover functionality.
This approach is framework agnostic. I have tested it on React and Angular. (For Angular, you will have to use ng-deep to workaround style encapsulation)
Cons:-
This won't work if you already have one or more columns pinned to the right
A future version of ag-grid might use different class names. So this CSS might need to be updated while upgrading ag-grid

Is it possible to change the font-size of the values within an ion-picker?

I made an ion-picker with which I can configure the font-size on my Ionic-App. So now I would like to change the font-size within the picker so that the user can see how big the font will be, before he has to confirm it. So for example if you scroll down and select 150%, it should re-scale the font-size to 150% just within the ion-picker.
I already know how to read the current value without confirming it and how to change the font in the entire app, so the only thing that's left would be to change the font of the picker-values.
add global.scss
.picker-opt{
font-size: 12px; //change size depend your Requirement
}
Yeah.
All what you need is to give the item an id;
And you make normal javascriptcode which is var elementsize = getelementbyid('and put there the item id);
Then
Elementsize.style["font-size"] = thepicker.value;
And that will solve your problem.
Or in otherway it can be binded with variable and ngmodule with this variable .
Regards.

jquery chosen not showing the selection option in dropdown

When jquery chosen's height is adjusted using the code
.chosen-results {
height: 82px;
}
It does not calculates the height correctly and when u select options inside it using keyboard, options are not shown. How can I fix it?
jsfiddle: http://jsfiddle.net/umcc9/6/
Steps:
1) Click on select box
2) Click Down key multiple times
3) When Val-4 will be highlight, it will not be visible in container
Ok Found the solution I need to set max-height
.chosen-results {
max-height: 82px;
}

Twitter Bootstrap - Dropdown height too small

I am using bootstrap in an Ruby on Rails app. I use Firefox. I find that the height of the dropdown field (select tag) is too small.However the height of the text fields are appropriate. I had too add the below code to application.css to fix it:
select {
height: 38px !important;
}
Now dropdown shows its content properly though its overall height (box) is a bit bigger that text fields. Is there a neater way to fix the issue?
I found it more appropriate to remove styling from application.scss and modify the app/assets/stylesheets/custom.css.scss instead. custom.css.scss is generated by Bootstrap. The padding for all FORM elements was set to 10px in that file. I set padding for SELECT element to 2px and left the rest intact.

GWT Column turn off word wrap

I am using a Gwt DataGrid with multiple Columns. The default behavior of the columns is to wordwrap. I would like for one of the columns to not wordwrap and just cut off. Is this possible?
For example, currently this is displayed:
I am making a
sandwich
I would like it to display:
I am making a
In addition to overflow:hidden you may need white-space:nowrap and finally add a text-overflow: ellipsis so there is an indicator to the user that the incomplete text is being shown.
You can set overflow: hidden in the style of each Column.
You can use DataGrid.addColumnStyleName to set styles on individual columns, or just addStyleName to add a style to the whole widget.