[Cuis-dev] Adding Scrollbar to an arbitrary Morph

Juan Vuletich juan at jvuletich.org
Fri Oct 22 12:14:24 PDT 2021


On 10/21/2021 11:15 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi Juan,
>
> As we can add scrollbar to arbitrary morph without subclassing (this 
> is very cool for end user scripting), we may need the accessors 
> #scrollDeltaHeight: and #scrollDeltaWidth: to adjust the v/h delta for 
> the scroll events. Here is a proposed changed set.
>
> I saw the classes HierarchicalListMorph, PluggableListMorph, 
> TextModelMorph override the getters, it may be wise to remove these 
> getters and adjust the variable accordingly in the respective 
> initialize methods. I did not do that because I will likely break the 
> image.
>
> Best
>
> Hilaire
>
> Le 19/10/2021 à 14:57, Juan Vuletich a écrit :
>> I thought this was working. Just pushed some updates to make it work 
>> again. See examples in class comment in PluggableScrollPane. Play 
>> with the halo with the inner morph, see how scrollbars adjust 
>> themselves as needed.
>>
>> Thanks,
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

Good idea. I didn't like adding two instance variables that are 
generally not used, so I just pushed an implementation that uses 
properties. Subclasses usually ask the scroller, or use some dynamic 
behavior, so they won't benefit from the ivars in any case.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20211022/e84598a9/attachment.htm>


More information about the Cuis-dev mailing list