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 [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 > [hidden email] > 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 [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
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 On Fri, Jan 6, 2012 at 5:00 PM, Tudor Girba <[hidden email]> wrote: Hi, _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi,
On 6 Jan 2012, at 23:42, Guillermo Polito wrote: > 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...) It's implemented in the way it is now because it uses the MorphTreeMorph which provides all of these. > If you say so, I think I can provide an implementation in the next days :). Great. Only do not call it for the moment TablePresentation. Call it something else and create a separate renderer. Like this we can look at it and see what we want without disturbing current users. Cheers, Doru > Guille > > On Fri, Jan 6, 2012 at 5:00 PM, Tudor Girba <[hidden email]> wrote: > 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 > > [hidden email] > > 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 > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev > > _______________________________________________ > Moose-dev mailing list > [hidden email] > https://www.iam.unibe.ch/mailman/listinfo/moose-dev -- www.tudorgirba.com Things happen when they happen, not when you talk about them happening. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |