[Pharo-dev] Horizontal scrolling in FastTable

Danil Osipchuk danil.osipchuk at gmail.com
Thu Nov 7 11:53:13 EST 2019


As a followup, attached is a changeset for Pharo8 with a simple
implementation of horizontal scrolling. I tried to keep it minimal.
It adds startColumnIndex var to FTTableContainerMorph which is being set
when  FTTableContainerMorph>>adjustToHorizontalScrollBarValue: is triggered.
The  main change is in #calculateColumnWidths - it starts distributing
space width from the startColumnIndex to ensure this area gets most
visibility. If startColumnIndex is 0, it reverts to old (current) behavior
- trying to draw columns starting from the first one as space permits.

The scrolling thus jumps to a beginning of the column and I'm not
particularly proud of the thing, but it is better then nothing and suits my
immediate needs. So may be it is worth a look for those who are interested.

To try one can use an example:
FTExamples exampleTableHorizontalScroll

Or even set trialHSB := true in FTTableMorth>>initialize (like I have to
enable it everywhere by default)
(as a side note the list is very quiet, compared to what it used to be
years ago)

пн, 4 нояб. 2019 г. в 14:14, Danil Osipchuk <danil.osipchuk at gmail.com>:

> Hi all
>
> I wonder what is happening to the horizontal scrolling in FastTable, the
> stub is there for years (I've checked the latest 8.0).
> I need it rather badly, could someone advise what is the hindrance there?
> I would try doing it myself, but I've never was doing much of UI
> programming and only recently returned to Pharo again, so have to catch up
> (a lot of things changed for good).
>
> How difficult would be to adopt vertical scrolling approach (which seems
> to be the same problem already solved to layperson )
>
>
> horizontalScrollBarValue: aNumber
> trialHSB ifNotNil: [
> self inform: 'FTTableMorph>>#horizontalScrollBarValue: ', aNumber
> printString , String cr,
> 'Does nothing yet.' , String cr, 'Need some advise here.'
> ].
>
> regards,
>   Danil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20191107/3cda434a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FastTableHorizontalScrolling.cs
Type: text/x-csharp
Size: 9355 bytes
Desc: not available
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20191107/3cda434a/attachment.cs>


More information about the Pharo-dev mailing list