Ok, so the right way to go is
- to implement a proper #render: in the GLMMorphicTableRenderer and
- clean the GLMMorphicListingRenderer? (I don't think lists and trees has much to do about columns...)
If you say so, I think I can provide an implementation in the next days :).
Guille
Hi,
Thanks for looking into this so deep :). This is more than welcome. Please continue :).
I intentionally do not show the horizontal scrollbar because when you have a list with long items, I do not want to have the horizontal scrollbar. I agree that there might be times when you would need it, but in most cases it's a usability impediment.
Now, if we talk about tables, the current implementation is barely useful for a narrow set of cases in which we just show a list with one or two columns. It's not really a table. So, to fix this, we have to implement a real table with useful semantics.
One option would be to add this as a setting to the presentation, but I do not want to do that either. The reason is that I would like to limit as much as possible the settings of the presentations because they should be about browsing, not about manipulating the graphical appearance of the widget.
Cheers,
Doru
> _______________________________________________
On 6 Jan 2012, at 19:37, Guillermo Polito wrote:
> Hi Doru!
>
> GLMMorphicListingRendered>>treeMorphFor:and:
>
> Which is the method that renders a table, hehe, only puts a vertical scrollbar:
>
> treeMorphFor: tmpTreeModel and: aPresentation
> | tmpTreeMorph columns |
> tmpTreeMorph := MorphTreeMorph new.
> tmpTreeMorph
> makeLastColumnUnbounded;
> doubleClickSelector: #onDoubleClick;
> getMenuSelector: #menu:shifted:;
> keystrokeActionSelector: #keyStroke:from:;
> cornerStyle: tmpTreeMorph preferredCornerStyle;
> borderStyle: (BorderStyle inset width: 1);
> autoDeselection: aPresentation allowsDeselection;
> hResizing: #spaceFill;
> vResizing: #spaceFill;
> layoutFrame: (LayoutFrame fractions: (0 @ 0 corner: 1 @ 1)).
> columns := aPresentation columns isEmpty
> ifTrue: [ OrderedCollection with: (MorphTreeColumn new rowMorphGetSelector: #elementColumn)]
> ifFalse: [
> aPresentation columns collect: [:each |
> GLMMorphTreeColumn new
> startWidth: each width;
> glamourColumn: each;
> headerButtonLabel: (aPresentation titleValueOfColumn: each)
> font: StandardFonts menuFont
> target: nil
> actionSelector: nil
> arguments: #();
> yourself ].
> ].
> tmpTreeMorph
> preferedPaneColor: Color white;
> model: tmpTreeModel;
> nodeListSelector: #roots;
> columns: columns.
> aPresentation isMultiple
> ifTrue: [tmpTreeMorph beMultiple]
> ifFalse: [tmpTreeMorph beSingle].
> tmpTreeModel chunkSize: aPresentation amountToShow.
> tmpTreeMorph vShowScrollBar.
> ^ tmpTreeMorph buildContents
>
> And if you have a large table with many columns, you can't scroll to the rightest end. I've changed that line by
>
> tmpTreeMorph showScrollBars.
>
> and the list and tree examples looks still ok.
>
> Thanks,
> Guille
> Moose-dev mailing list
> Moose-dev@iam.unibe.ch
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"If you interrupt the barber while he is cutting your hair,
you will end up with a messy haircut."
_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev