How to make a scrollpane adjust to its content?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How to make a scrollpane adjust to its content?

Nicolai Hess-3-2
sp setScrollDeltas.

This will reset (or add or remove) the scrollbars.

I was wondering why something like
rows updateLayout or
rows changed

doesn't work.

Do we have a way to let a ScrollPane "know" when the submorphs changed ?
Some way for listening to newly added submorphs. Or add
the pane to dependents for its scrolled area and notify on changes for submorphs or just
the size?
(The content morph ("rows" in this example) can automatically adjust its
size when we add new submorphs)


nicolai



Reply | Threaded
Open this post in threaded view
|

Re: How to make a scrollpane adjust to its content?

Karl Ramberg
sp setScrollDeltas 

Best,
Karl

On Tue, Jan 12, 2016 at 8:03 PM, Nicolai Hess <[hidden email]> wrote:
sp setScrollDeltas.

This will reset (or add or remove) the scrollbars.

I was wondering why something like
rows updateLayout or
rows changed

doesn't work.

Do we have a way to let a ScrollPane "know" when the submorphs changed ?
Some way for listening to newly added submorphs. Or add
the pane to dependents for its scrolled area and notify on changes for submorphs or just
the size?
(The content morph ("rows" in this example) can automatically adjust its
size when we add new submorphs)


nicolai







Reply | Threaded
Open this post in threaded view
|

Re: How to make a scrollpane adjust to its content?

Karl Ramberg
Ugh,
Didn't read the question correctly.

I see any passive ways scroll delta is updated in the image.

Best,
Karl


On Tue, Jan 12, 2016 at 8:16 PM, karl ramberg <[hidden email]> wrote:
sp setScrollDeltas 

Best,
Karl

On Tue, Jan 12, 2016 at 8:03 PM, Nicolai Hess <[hidden email]> wrote:
sp setScrollDeltas.

This will reset (or add or remove) the scrollbars.

I was wondering why something like
rows updateLayout or
rows changed

doesn't work.

Do we have a way to let a ScrollPane "know" when the submorphs changed ?
Some way for listening to newly added submorphs. Or add
the pane to dependents for its scrolled area and notify on changes for submorphs or just
the size?
(The content morph ("rows" in this example) can automatically adjust its
size when we add new submorphs)


nicolai








Reply | Threaded
Open this post in threaded view
|

Re: How to make a scrollpane adjust to its content?

Nicolai Hess-3-2


Am 12.01.2016 8:24 nachm. schrieb "karl ramberg" <[hidden email]>:
>
> Ugh,
> Didn't read the question correctly.

:-)

>
> I see any passive ways scroll delta is updated in the image.

OK,
thanks.

>
> Best,
> Karl
>
>
> On Tue, Jan 12, 2016 at 8:16 PM, karl ramberg <[hidden email]> wrote:
>>
>> sp setScrollDeltas 
>>
>> Best,
>> Karl
>>
>> On Tue, Jan 12, 2016 at 8:03 PM, Nicolai Hess <[hidden email]> wrote:
>>>
>>> See stackoverflow question
>>> http://stackoverflow.com/questions/34722545/how-to-make-a-scrollpane-adjust-to-its-content/34751687#34751687
>>>
>>> all I came up with is
>>> calling
>>> sp setScrollDeltas.
>>>
>>> This will reset (or add or remove) the scrollbars.
>>>
>>> I was wondering why something like
>>> rows updateLayout or
>>> rows changed
>>>
>>> doesn't work.
>>>
>>> Do we have a way to let a ScrollPane "know" when the submorphs changed ?
>>> Some way for listening to newly added submorphs. Or add
>>> the pane to dependents for its scrolled area and notify on changes for submorphs or just
>>> the size?
>>> (The content morph ("rows" in this example) can automatically adjust its
>>> size when we add new submorphs)
>>>
>>>
>>> nicolai
>>>
>>>
>>>
>>>
>>
>
>
>
>