Scrolling can only be handled by one element. The browser component is 
native so only it can scroll. That's why it's in the center of the form. 
Center is a special case where scrolling is disabled and size is determined 
by available space. So native scrolling in the BC takes over. 
If you add Codename One based scrolling they'll collide and you'll get a 
jumping mess that looks and feels awful. It's an either/or situation. 

On Thursday, March 18, 2021 at 10:31:07 AM UTC+2 P5music wrote:

> I tried what you suggest, even it is not what I meant.
> As expected it does not work, because the container in the north position 
> has not to scroll inside itself.
>
> Also my idea was not good in the original form I proposed above, so this 
> is the new version:
>
> I think that the scrolling of the entire BL (mainContainer) has to happen, 
> in fact it happens even with scrollableY=false.
> Now I put true but it is the same.
>
> The text inside the BC has some strange scrolling, for example if the 
> caret is on the bottom (so there is a lot of text above that has scrolled 
> inside the BC) I can scroll back touching on the beginning of the text, and 
> it scrolls at chunks. Better than nothing.
> But If I am in landscape mode, it is the container in the north that is 
> lost at sight.
>
> It is why I would like to pass the touch move events to the underlying 
> mainContainer.
> Of course they would be filtered and they would pass only when the BC is 
> in the very top scroll position, otherwise they would be used to scroll the 
> BC itself.
>
> Is it possible?
> Il giorno giovedì 18 marzo 2021 alle 04:09:14 UTC+1 Shai Almog ha scritto:
>
>> Make the container in the north scrollable on Y axis e.g. 
>> northContainer.setScrollableY(true). 
>> Make sure it has a layout such as BoxLayout Y. 
>>
>> On Wednesday, March 17, 2021 at 5:25:10 PM UTC+2 P5music wrote:
>>
>>> @Javier
>>> It is enough that the UI scrolls, not the BC content, its height is set 
>>> at large so it seems very large.
>>> The user just can touch inside it to set the caret position when editing.
>>> About what you meant about the BC being alone it is not necessary.
>>>
>>> However what I meant is that
>>> when the user edits inside the BC the touch-keyboard appears and the 
>>> NORTH part is lifted up and it is lost at sight, so the user has not any 
>>> area to drag to scroll back. But the scrolling works before it happens.
>>> In Android two scrolling areas are certainly possible, and one can be 
>>> used when the other has reached its limit.
>>> I know this is not possible with CodenameOne.
>>> I am assessing whether my app can be published. There are also some 
>>> checks about the filesystem that would be possible only in the iOS 
>>> simulator, I do not know when that new CN feature is available. I am 
>>> finishing my Swift project, at least for iOS 14>.
>>>
>>> Regards
>>>
>>> Il giorno mercoledì 17 marzo 2021 alle 16:06:31 UTC+1 
>>> javier...@gmail.com ha scritto:
>>>
>>>> Right, so what I meant is that there can only be 1 BC in CENTER, and 
>>>> nothing anywhere else in the BL. You can't safely scroll a BC, the 
>>>> scrolling is in the BC itself
>>>>
>>>> This is accurate as far as I know
>>>>
>>>> On Wed, 17 Mar 2021 at 14:32, 'P5music' via CodenameOne Discussions <
>>>> codenameone...@googlegroups.com> wrote:
>>>>
>>>>>
>>>>> @Javier
>>>>> of course it is in the CENTER of a BL, just there is something NORTH 
>>>>> too. Do not worry.
>>>>> It has also callbacks inside, like you say.
>>>>> The question is now how to allow the scrolling back when the touch 
>>>>> keyboard has scrolled the UI too much.
>>>>> Regards
>>>>> Il giorno mercoledì 17 marzo 2021 alle 14:09:20 UTC+1 
>>>>> javier...@gmail.com ha scritto:
>>>>>
>>>>>> I think this has been discussed before. BrowserComponent is meant to 
>>>>>> be used in the center of a BorderLayout Form. Avoid mixing it with other 
>>>>>> components other than a toolbar. If you want to add stuff next to your 
>>>>>> BC, 
>>>>>> add it in the html and pass callbacks
>>>>>>
>>>>>> On Wed, 17 Mar 2021 at 11:48, 'P5music' via CodenameOne Discussions <
>>>>>> codenameone...@googlegroups.com> wrote:
>>>>>>
>>>>>>> I have some troubles with the scrollable feature of Containers when 
>>>>>>> a BrowserComponent is involved, especially on simulator.
>>>>>>> I can have some good functioning on Android if I assign a large 
>>>>>>> height to its content.
>>>>>>>
>>>>>>> In certain cases the BrowserComponent takes all the space in the UI.
>>>>>>> My app has an editing screen that has some controls on the top part, 
>>>>>>> and a BC on the bottom part.
>>>>>>> The UI scrolls but when I start writing into the BC it takes all the 
>>>>>>> space and it is not possible to scroll back or to see or regain control 
>>>>>>> of 
>>>>>>> the top part of the UI.
>>>>>>>
>>>>>>> I would like to pass the touchmove events to the underlying 
>>>>>>> Container.
>>>>>>> It is a special event that I use along with touchstart and touchend 
>>>>>>> to ensure the scroll events are filtered, but it is used in another 
>>>>>>> BrowserComponent.
>>>>>>>
>>>>>>> Now I want to use it to create a smooth user experience for this BC, 
>>>>>>> passing it in a transformed form to the underlying Container. So I am 
>>>>>>> not 
>>>>>>> going to pass it directly.
>>>>>>>
>>>>>>> I just want to know what method I have to call on the main 
>>>>>>> underlying container to make it scroll.
>>>>>>>
>>>>>>> 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 codenameone-discu...@googlegroups.com.
>>>>>>> To view this discussion on the web visit 
>>>>>>> https://groups.google.com/d/msgid/codenameone-discussions/dbbb198e-68ca-4b21-aa2b-0a98411769cbn%40googlegroups.com
>>>>>>>  
>>>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/dbbb198e-68ca-4b21-aa2b-0a98411769cbn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> -- 
>>>>> 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 codenameone-discu...@googlegroups.com.
>>>>>
>>>> To view this discussion on the web visit 
>>>>> https://groups.google.com/d/msgid/codenameone-discussions/9ea2af3a-6200-4284-9362-6c136f8518fdn%40googlegroups.com
>>>>>  
>>>>> <https://groups.google.com/d/msgid/codenameone-discussions/9ea2af3a-6200-4284-9362-6c136f8518fdn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>>

-- 
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 codenameone-discussions+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/beba996c-ceef-45f4-beb0-fc46f09692c7n%40googlegroups.com.

Reply via email to