Hi, all. Update your Trunk image and try this: | model view | model := { SystemNavigation default allClasses collect: #name. SystemNavigation default allClasses collect: #category. }. view := PluggableMultiColumnListMorph on: model list: #yourself selected: nil changeSelected: nil. view extent: 200@300. view listFilterSet: 'Hand'. view openInHand. "Play around with horizontal alignment." view listMorphs first cellPositioning: #rightCenter. view listMorphs second cellPositioning: #center. view listMorphs do: [:col | col cellPositioning: #leftCenter]. "Play around with margins." view listMorphs do: [:col | col cellInset: 0]. view listMorphs do: [:col | col cellInset: 3@0]. view listMorphs do: [:col | col cellInset: 5]. "Funny but not useful." view listMorphs first cellInset: 3. view listMorphs second cellInset: 0. "Fit all contents." view listMorphs do: [:col | col hResizing: #shrinkWrap; vResizing: #shrinkWrap]. "always set anyway" view hResizing: #shrinkWrap; vResizing: #shrinkWrap. "Enable horizontal scrolling" view hResizing: #rigid; hScrollBarPolicy: #whenNeeded; width: 100. "Disable horizontal scrolling" view hScrollBarPolicy: #never. Best, Marcel |
Hi Marcel
It works fine. Note that if you do not define - model - view as block variables | model view | and thus have them as workspace bound variables you may execute single statements later on the same morph and thus see the effect of the statement dynamically applied. More: https://wiki.squeak.org/squeak/6629 Kind regards Hannes On 10/15/19, Marcel Taeumel <[hidden email]> wrote: > Hi, all. > > Update your Trunk image and try this: > > > | model view | > model := { > SystemNavigation default allClasses collect: #name. > SystemNavigation default allClasses collect: #category. > }. > > view := PluggableMultiColumnListMorph > on: model > list: #yourself > selected: nil > changeSelected: nil. > > view extent: 200@300. > view listFilterSet: 'Hand'. > > view openInHand. > > "Play around with horizontal alignment." > view listMorphs first cellPositioning: #rightCenter. > view listMorphs second cellPositioning: #center. > view listMorphs do: [:col | col cellPositioning: #leftCenter]. > > "Play around with margins." > view listMorphs do: [:col | col cellInset: 0]. > view listMorphs do: [:col | col cellInset: 3@0]. > view listMorphs do: [:col | col cellInset: 5]. > > "Funny but not useful." > view listMorphs first cellInset: 3. view listMorphs second cellInset: 0. > > "Fit all contents." > view listMorphs do: [:col | col > hResizing: #shrinkWrap; > vResizing: #shrinkWrap]. "always set anyway" > view > hResizing: #shrinkWrap; > vResizing: #shrinkWrap. > "Enable horizontal scrolling" > view > hResizing: #rigid; > hScrollBarPolicy: #whenNeeded; > width: 100. > "Disable horizontal scrolling" > view hScrollBarPolicy: #never. > > Best, > Marcel |
Thanks for the pointer. I added that "| ... |" just for documentation. You are right, it impedes experimentation in the workspace. Best, Marcel
|
Yes,
I wonder how I enable the navigation keys (cursor keys plus page up / page down) --Hannes On 10/15/19, Marcel Taeumel <[hidden email]> wrote: > Thanks for the pointer. I added that "| ... |" just for documentation. You > are right, it impedes experimentation in the workspace. > > Best, > Marcel > Am 15.10.2019 11:48:01 schrieb H. Hirzel <[hidden email]>: > Hi Marcel > It works fine. > > Note that if you do not define > - model > - view > as block variables | model view | > and thus have them as workspace bound variables you may execute single > statements later on the same morph and thus see the effect of the > statement dynamically applied. > > More: https://wiki.squeak.org/squeak/6629 > > Kind regards > Hannes > > On 10/15/19, Marcel Taeumel wrote: >> Hi, all. >> >> Update your Trunk image and try this: >> >> >> | model view | >> model := { >> SystemNavigation default allClasses collect: #name. >> SystemNavigation default allClasses collect: #category. >> }. >> >> view := PluggableMultiColumnListMorph >> on: model >> list: #yourself >> selected: nil >> changeSelected: nil. >> >> view extent: 200@300. >> view listFilterSet: 'Hand'. >> >> view openInHand. >> >> "Play around with horizontal alignment." >> view listMorphs first cellPositioning: #rightCenter. >> view listMorphs second cellPositioning: #center. >> view listMorphs do: [:col | col cellPositioning: #leftCenter]. >> >> "Play around with margins." >> view listMorphs do: [:col | col cellInset: 0]. >> view listMorphs do: [:col | col cellInset: 3@0]. >> view listMorphs do: [:col | col cellInset: 5]. >> >> "Funny but not useful." >> view listMorphs first cellInset: 3. view listMorphs second cellInset: 0. >> >> "Fit all contents." >> view listMorphs do: [:col | col >> hResizing: #shrinkWrap; >> vResizing: #shrinkWrap]. "always set anyway" >> view >> hResizing: #shrinkWrap; >> vResizing: #shrinkWrap. >> "Enable horizontal scrolling" >> view >> hResizing: #rigid; >> hScrollBarPolicy: #whenNeeded; >> width: 100. >> "Disable horizontal scrolling" >> view hScrollBarPolicy: #never. >> >> Best, >> Marcel > > |
You need a selection for that. That's what you navigate: the selection. Best, Marcel
|
... so, you need a model that can provide both the list and the selection: PluggableMultiColumnListMorph on: model list: #list selected: #selectedIndex changeSelected: #selectedIndex:. Hmm.. there is no quick way to try this out in a Workspace. We could use a dictionary-like object that reads and stores data on #doesNotUnderstand:. :-) Then you wouldn't have to implement a new class for such models. Best, Marcel
|
A suggestion for column-specific list-filtering for PluggableMultiColumnListMorph: - when the filter string starts with one space, the remainder of the filter string matches on the first column only - when the filter string starts with two spaces, the remainder of the filter string matches on the second column only - etc. - when the filter starts with a non-space character, the whole string applies and all columns are searched Best, Chris On Tue, Oct 15, 2019 at 7:54 AM Marcel Taeumel <[hidden email]> wrote:
|
Would Work If space does Not toggle a multi-selection state. 😁
On Wed, Oct 16, 2019 at 11:23 PM +0200, "Chris Muller"
<[hidden email]> wrote:
|
Could we use the right and left arrow keys here? (more intuitive)
For example: When filtering is active, arrow right selects first column, then second, third, ..., last column, and then nothing special again. Filtering is then restricted to the selected column. However, this would need some additional formatting ... 🤔 Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Donnerstag, 17. Oktober 2019 19:37:16 An: The general-purpose Squeak developers list; [hidden email] Betreff: Re: [squeak-dev] Examples of PluggableMultiColumnListMorph configuration
Would Work If space does Not toggle a multi-selection state. 😁
On Wed, Oct 16, 2019 at 11:23 PM +0200, "Chris Muller"
<[hidden email]> wrote:
Carpe Squeak!
|
On Thu, Oct 17, 2019 at 1:03 PM Thiede, Christoph <[hidden email]> wrote:
Yes, that's more intuitive (even though not reachable with hands at the home row, no biggie :) ). It'd have to support both cases though, of when a filter is already present, and when it isn't. With an existing filter, I guess the whole list contents could change with each press of the arrow, including possibly an empty list for a particular column. [Backspace] in list-filtering is supposed to invoke, "return to the selection prior to starting the current filtering", so that'd have to include the column selection, if any, too.. - Chris
|
Hi, all. Find a first version of that in Trunk. Let me know it it is somewhat intuitive enough. It's easy to change. Usually, arrow keys are reserved for selection/navigation in such widgets. Here, we are talking about filter configuration instead. So, I opted for the [Tab] key to cycle between columns for filter configuration. Restricting the filter to the current (multi) selection would be a different challenge... Best, Marcel
|
Free forum by Nabble | Edit this page |