[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-28 Thread 'P5music' via CodenameOne Discussions
I guessed that the last two instructions are indeed: table.add(tl.cc().hp(100).wp(50), textAreaLeft); table. add(tl.cc().hp(100).wp(50), textAreaRight); and that myForm is my Form. It works now. Thank you, Regards Il giorno venerdì 28 agosto 2020 alle 06:54:56 UTC+2 Shai Almog ha scritto: > It

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-27 Thread Shai Almog
It does work 100% sure. I don't even need setScrollable(false) for this case: Form myForm = new Form("Title", new BorderLayout()); TableLayout tl = TableLayout(2, 1); Container table = new Containter(tl); myForm.add(CENTER, table); myForm.add(NORTH, new Label("My Label"));

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-27 Thread 'P5music' via CodenameOne Discussions
As I said using the BorderLayout CENTER does not work in any combination with the TL and BCs. Please if you know the solution, please give me the constraints so to have a Label at the top and then the TL with BCs below (50/50 horizontally, spread vertically). Thanks in advance Il giorno

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-26 Thread Shai Almog
It works fine with containers. It doesn't work this way for non-deterministic hierarchy. So if you place the table layout in the CENTER of a border layout and place a simple label in the north of the border layout it will work too. Where it will fail is if you will place a scrollable in the

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-26 Thread 'P5music' via CodenameOne Discussions
Yes it is a separate class that extends Form. Now I see that your code works, but only when a TL is added to the form. Indeed I cannot have a text area at the top, and then the TL. This is somewhat acceptable for my app, or I can use the 70/30 layout with BL. I have to present the instructions

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-26 Thread Shai Almog
Is this a subclass of form? Actually my code was wrong. You should do: add(tl.cc().hp(100).wp(50), textAreaLeft); add(tl.cc().hp(100).wp(50), textAreaRight); On Tuesday, August 25, 2020 at 11:51:55 AM UTC+3 P5music wrote: > As I said, my layout needs a TableLayout with 1 row and 2 columns

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-25 Thread 'P5music' via CodenameOne Discussions
As I said, my layout needs a TableLayout with 1 row and 2 columns (not 2 rows and 1 column), so I changed your code: BrowserComponent textAreaLeft=new BrowserComponent(); textAreaLeft.setPage("MULTILINE TEXTMULTILINE TEXTMULTILINE TEXTMULTILINE TEXTMULTILINE TEXTMULTILINE TEXTMULTILINE

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-24 Thread Shai Almog
TableLayout tl = TableLayout(2, 1); myForm.setLayout(tl); myForm.setScrollable(false); myForm.add(tl.cc().hp(50), bc1); myForm.add(tl.cc().hp(50), bc2); On Monday, August 24, 2020 at 12:54:50 PM UTC+3 P5music wrote: > I will have a look at the Component Inspector. > But you seem very confident

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-24 Thread 'P5music' via CodenameOne Discussions
I will have a look at the Component Inspector. But you seem very confident about the TL-BC behaviour, so I think it's me that cannot guess the right constraint to the TL. Please give me two lines of code where you create a working 50/50 TL layour with two BCs that expand vertically. 1 row and 2

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-23 Thread Shai Almog
You need to use Component inspector to look at hierarchies, it shows the layout and would have made this easier to spot. You shouldn't use non-center border layout for browser component. If you place TableLayout on the form itself. Disable scrolling and add both rows with height set to 50 (and

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-23 Thread 'P5music' via CodenameOne Discussions
I realized that the default form layout is FlowLayout and not BorderLayout (I do not where I read that) so it is not a bug, although I would expect an error or warning when using BorderLayout constraints in the add() call. Said that it is not possible to use a TableLayout to split the screen

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-22 Thread Shai Almog
You can't rely on that. The layout code is very cross platform since it's 100% Java. The things that behave differently are native e.g. the browser. In this case I'm pretty sure the layout will misbehave. You need to create 100% deterministic layout with no scrolling for the browser component.

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-22 Thread 'P5music' via CodenameOne Discussions
If the BrowserComponent itself (rendering, updating, Javascript) would not have issues on the real iOS app (native build) like they exist on the simulator, I wonder whether also these layout issues are automatically happening on the real iOS app. Unfortunately iOS builds are "costly" in terms

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-21 Thread Shai Almog
You don't need the border layout. This is only a tip for the simple usage in a form. Using the same strings make it hard for me to read the code and screenshot without trying it. If you think there's a bug you can file an issue. Unfortunately you probably understand we have a deep issue

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-21 Thread 'P5music' via CodenameOne Discussions
I use BL surrounding a BC because I think I have understood that it "encourages" the BC to spread. And other BLs are surrounding. It is a trial/error method but now I am stuck. I wanted to show you a possible issue: indeed the layout is inverted, what is CENTER is at the top and what is NORTH

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-20 Thread Shai Almog
You can nest a border layout in a table cell although I'm not sure what the benefit would be but this is OK. You lost me a bit with all the level of nesting all over the place, reading the code I have no idea how it should look by now and since everything is conveniently named "Multiline text"

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-20 Thread 'P5music' via CodenameOne Discussions
You have to see the attached image, that corresponds to the code below: you can see an inverted layout, indeed the instructions text is at the bottom, while it is added NORTH to the form. And what you see at the top is added CENTER. I was trying some changes and stumbled into this. Am I wrong?

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-19 Thread Shai Almog
Don't use center constraint in the table layout. It will break everything. Leave it as the default. Height should never be 100 as all the heights together should come up to 100 (it's in percent). Don't use span, it makes column calculation hard and spanning 2000 columns is probably not what

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-19 Thread 'P5music' via CodenameOne Discussions
Here is what I tried: main form is BoxLayout.y() I add a SpanLabel, and it works, the area on top shows the text. I add a BorderLayout Container to the mainForm, inside this Container I put a TableLayout Container CENTER, the TL has two BorderLayout containers inside. In each of these two

[codenameone-discussions] Re: Tiny BrowserComponents in layout with BorderLayout.NORTH, WEST, EAST (CENTER inside)

2020-08-19 Thread Shai Almog
That won't work since browser component layout is non-deterministic. Only the center will work correctly. You need to know the approximate size of the layout in advance with browser component. It's an "all or nothing" approach. You can use table layout with height/width constraints for the