Horizontally Scroll a Grid
About This Space
Examples for how to set up a grid to be horizontally scrollable, but only if the screen is too small, otherwise, it just fills available space.
Last updated on August 26, 2019
Forked from: /megan_bond/quick-display/
Public Permissions: View Open/Fork Run Comment
Horizontal Scroll for Grids & Resize Grid on Window Size/Orientation Change.
Description
How to horizontally scroll a grid too big for its container and how to resize a grid when the window size or orientation is changed.
** Please note that the data used to fill the grids is random and does not correspond to known persons.
** Please note that what is being provided is only an example, you may need to do some customization or derivation to create the solution best suited to your project requirements.
Instructions
- Add desired layout to the screen.
- Nest a Simple Container layout widget inside the previously added layout.
- Set width and height of the Simple Container to 100% so that it fills the outter layout.
- Set min-width of Simple Container to the minimum width you would like the grid to be. Must be a non-relational unit, i.e. 650px.
- Add grid to the Simple Container.
- Set overflow x of outermost layout to
scroll
orauto
. If the outermost layout is a:
- Simple Container - set
overflow x
widget property in the properties panel. - Mobile Layout - custom css is needed, as shown below. Custom CSS should be added to a
*.css
file in the.../userdata/custom
folder (when using IFS or local installation of Profoudn UI or PJS) or linked to the screen by setting a link in the HTML, import with JS or jQuery, or linked using theexternal css
property of the screen (as has been done in this example on NodeRun).
/* Mobile Layout X Overflow CSS Property */
/* overflow-x property possible values: */
/* auto - Show scrollbar only if can scroll */
/* scroll - Always show scrollbar. */
/* visible - Content is visible past container borders. */
/* hidden - Content is hidden past container borders. */
div.mobile-device-layout div.content-section {
overflow-x: auto;
}
- Test it out your program and see how it fits to the available space, but overflows if the screen gets to be too small.
How to Use
Fork to new workspace to make additions, edits, and changes.
App... | ...Name |
---|---|
File | index.js |
Function | index() {...} |
Display | index.json |
Screen | index |
Author: megan.bond
Date: Aug 11th, 2019
More Spaces By megan.bond (@megan_bond)
Save the row the user was on before the screen was submitted. Then, refocus that row when the user has returned to the page, even if they went to other pages in the meantime.
26129
0
1
23837
0
0
29891
0
0
A demo of how to build Rich Displays in the Visual Designer that integrate with external CSS and JavaScript file
26476
0
0
A demo of how to build Rich Displays in the Visual Designer that integrate with external CSS and JavaScript file
25822
0
0
A demo of how to build Rich Displays in the Visual Designer that integrate with external CSS and JavaScript file
25220
0
0
A Hello World app with both dynamic output and input fields. It also illustrates the basics of screen transition animation.
25815
0
0
A Hello World app with both dynamic output and input fields. It also illustrates the basics of screen transition animation.
25970
0
0
25914
0
0
Be the first to comment:
Comments