Adding more than one viewport in Extjs Application - extjs

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.

Related

How can I use Material UI media queries inside fixed-width container?

How can I use Material UI media queries inside fixed-width container?
I have a screen and inside the screen I have another small container, with a size of mobile phone. I need the Material UI media queries to act inside the small container like it's the all screen, to show inside the elements like in mobile view and not like in desktop view even when the global container is in a size of a desktop version.
Thanks

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.

Absolute transparent web browser control, is it possible?

I'm creating a desktop Winforms or WPF app, but I'm using HTML/JS/CSS to create UI. So the simpliest solution is using a Web Browser control in a host window.
I want an absolute transparent web browser control now.
For example, I have DIV with 50% transparency, then I should see the Windows desktop icons through the DIV (The host form and web browser control should be transparent).
Is it possible?
Here are several possibilities
If you do not care about the size of browser window, you can set the Width and Height to 0.
If you want to have a specified browser window size, you can set the Left equals -Width and Top equals -Height.
Set the Parent of browser control to Null, so that the browser control will become invisible as well.
I prefer the second solution.

Include ExtJS control into my div

I am trying to use this example to include this im my web-site. The matter is, if I try to copy it into my application, these controls fit all page. How can I include ExtJS controls into my div?
The ExtJS Portal demo uses an Ext.Viewport control to maximize the application to the entire browser window. To have the portal or parts inside another element or control, exchange the Viewport control with a Ext.Container or a Ext.Panel.
You should use renderTo propery to specify id of element, where control should be rendered.

Resources