The size of the browser component must be deterministic. That means If you 
place the hierarchy or the browser component in NORTH it will size it based 
on preferred size which is 0 and that won't end up well.

If your layout is more complex than those two options you'd either need to 
explicitly invoke setPreferredSize() (no the browser component) or simplify 
the layout.

On Tuesday, August 11, 2020 at 11:36:32 AM UTC+3 P5music wrote:

> My layout is more complex than a BC in a Table layout. The "detail" part 
> on the right features that BC but it is not the only control, some space  
> are used NORTH for other controls, and some space has to remain empty 
> SOUTH, even if I had to put the BC in the center of a BorderLayout. I 
> accomplished your suggestions, but the point was the BC was tiny. I used 
> the Containers as you said but in a more complex way, combinating them one 
> inside the other.
> Now I need that the BC has a certain height, it was my original goal. I 
> cannot set the TL cell height because the BC is not the entire cell, maybe 
> I did not understand what you mean.
> Thanks in advance
>
>
> Il giorno martedì 11 agosto 2020 03:55:50 UTC+2, Shai Almog ha scritto:
>>
>> If it's in the center it takes up the whole set of available space. You 
>> can see this using the component inspector tool. 
>> I explained to you in your previous post how you can use TableLayout with 
>> BrowserComponent. You just need to disable form scrolling and make sure to 
>> define a height/width constraint to the cell.
>>
>> On Monday, August 10, 2020 at 12:12:03 PM UTC+3 P5music wrote:
>>
>>> I am using the new CEF BrowserComponent.
>>> I put it inside a BorderLayout, at the center, so it takes the space 
>>> according to the content (the surrounding form/container have been set 
>>> correctly to allow this layout to happen).
>>> I need to set the height to a certain size, like 200px, or 4 lines of 
>>> text, for example.
>>> If I set the page to an HTML string with text inside, I see the text and 
>>> no scrollbars (that instead appear in other cases), so it seems that the 
>>> size is not as tall as the remaining space. It is good for my layout but I 
>>> need to set the height exactly before there is text inside, and It has not 
>>> to resize automatically.
>>> The setHeight method does not work, not even after the onload event.
>>> 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/a9eb7caf-6eeb-4969-a9bc-8b6a5eea27afn%40googlegroups.com.

Reply via email to