react-swipe: multiple panels in view? - reactjs

I'm using the wonderful react-swipe component which is working perfectly for single-panel swiping (i.e. mobile). However, on tablet / desktop I would need to display 3 panels at once, with the center tablet 'active'.
Can I get some tips on how to adjust the styling for this component and it's children to achieve this? See attached image.

Related

How to enable scrolling in CanvasJS charts on mobile?

I am using the ReactJS version of the CanvasJS library.
I have some charts laid out on the screen such that they take up close to 100% height and width on a mobile device.
When I place my fingers on the chart and drag (in order to scroll down the page), I am unable to scroll. This issue doesn't happen on other parts of the page where I don't have the chart.
Is there any way to get scrolling working properly when touching these charts on mobile?
Figured it out.
I had the CanvasJS component wrapped inside a div component.
This div component had the following CSS attributes applied to it:
overflow-y:auto;
overflow:scroll;
overflow-x:auto;
Once I removed those CSS attributes (which didn't need to be there in the first place) I was able to touch-drag on the chart component on mobile.

Display HTML in Boxlayout

I want to display HTML in my forms. The problem is I have to use a Boxlayout to place my components. So when I put a WebBrowser I'll have some height and scroll issues. I get the HTML I want to display from a webservice. The length of the content is variable. I just want to display a part of this response. Here is what I already have:
The webBrowser is below the edit button and ends near the LBL_LIB_NOM label.
As you can see the webBrowser is way too high and I can't scroll the Form when I click over the WebBrowser. In this example I would like to reduce the size of the WebBrowser so we can only see the Title. I also would like if possible to scroll my form when I click on the WebBrowser since I don't want the WebBrowser to scroll.
I have tried a few things to solve my issue:
I tried to override the calcPreferredSize method.
I revalidate my form and my webbrowser.
I resized it's container using the deprecated setPreferedSize method.
In that case the container is well sized but the the WebBrowser displays
above the other components.
The usual answer I have seen in other posts is to put the WebBrowser in a BorderLayout but I can't do that.
So here is my question: Is there any other component I can use to display one HTML line ? Or is there a way to make a webBrowser work properly in a boxLayout ? Do I have to write my own HTML renderer ?
I'm guessing you want box layout so you can scroll... This is problematic.
Web views generally expect to scroll themselves and this is common in native widgets which handle their own events and thus scrolling. It's hard for our code to know when your swipe is intended for us or to the underlying native widget and it's harder still to do this in a consistently portable way.
There are 3 options:
Use only Codename One code
Use a border layout or similar layout
Use the web browser for the entire UI of this form
If you want to take the first option this article might be useful as a starting point.

in a CodenameOne UI Designer App, why might Android scroll but iOS truncates?

I have a BorderLayout Form where the Center is a ScollableY container which is BorderLayout with it's center having a container where I add items dynamically (BoxLayoutY).
The problem I'm having is that on Android Simulator and Device, it scrolls as it should but on iOS Simulator it truncates the dynamic list of items when its out of room.
What should I be checking in my UI Designer or Dynamic Loading Code to determine what could be causing this strange inconsistency?
I've attached a screenshot of both side by side.
You can't make a BorderLayout Container scrollable. We implicitly disable this to prevent a common mistake. It looks like what you really want to do is to make the BoxLayout.Y_AXIS scrollable on Y.

codenameone autocomplete text field display issue in gui

I m working on my mobile apps using codename1 and i found that after adding an autocomplete textfield to any form, every other component disapears along with tabs behind a white container.
It sounds like you are using a scrollable FlowLayout (which is the default layout manager) and some nesting behavior goes bad.
Another guess is that you add everything into the layered pane which is a HUGE MISTAKE, you should add everything to the form directly or content pane.

Adding more than one viewport in Extjs Application

Is it possible to add more than one viewport in an application. Since we can add other containers more than one time and viewport is also a container.
I think of the Viewport as representing all of the possible viewing space of the web browser window. It is a special Container that re-sizes as the web browser re-sizes. In a full screen ExtJS application, all the other containers should all be nested under the single Viewport so that they can re-size themselves relative to the browser window as well. For this reason there is no concept of multiple ExtJS Viewports.
If, instead of a full screen ExtJS application, you wish to have multiple ExtJS widget applications embedded in div tags of some static html page then Viewport should probably not be used. Container or Panel objects can be the top level parent.

Resources