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 container I put the BrowserComponents CENTER with 
constraint 100 height percentage, 50 width, and the TL has this constraint 
too:
tl.createConstraint().setVerticalSpan(2000);

So, to recap, the BC are CENTER in two BL containers. That are in a TL with 
those constraints. The TL is CENTER inside a BL. That is added to the 
mainForm (BL y) after a SpanLabel.
Result: the SpanLabel is displayed entirely, while the two BC are just one 
line tall.
Thanks in advance


Il giorno mercoledì 19 agosto 2020 alle 08:12:35 UTC+2 Shai Almog ha 
scritto:

> 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 browser component cells.
>
> On Tuesday, August 18, 2020 at 10:31:15 AM UTC+3 P5music wrote:
>
>> In my app I have a screen with instructions. It has a special purpose so 
>> it has a suitable layout.
>> There are three text areas, that I can render with SpanLabels or 
>> BrowserComponents because I need that the text overflows with scrollbars 
>> horizontally.
>> First I wonder if it is possible with SpanLabels.
>>
>> Now I have two versions. The one with SpanLabels has the right layout and 
>> shows the text correctly but has not horizontal scroll. 
>>
>> The one with BrowserComponents has three tiny BCs.
>> I mean, I created a layout this way: mainForm has a BL inside. The BL has 
>> three BLs inside NORTH, WEST, EAST. Each of these BLs has a 
>> BrowserCommponent inside CENTER with a HTML page inside.
>> As said I just get tiny BCs, and, in fact, at start I see a different 
>> layout, while after I touch it, it shows the three areas, but tiny and ony 
>> scrollbars are visible, except for a line of text.
>> I think it is not just matter of BorderLayout.CENTER, BC has some issues. 
>> However maybe I have to change something, because in other part of the app 
>> I succeeded in having a full size BC.
>> Thanks in advance
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/07021838-7345-487a-86c3-819cb1af769fn%40googlegroups.com.

Reply via email to