Hi,
I have a code like this: FastTableModel new displayBlock: [ :node | node name ]; items: Collection withAllSubclasses; openWithSpec. Which works fine. But I would like to define row height for each item. FTTableMorph has a method rowHeight:. Is it possible? One possible use case could be: FastTableModel new displayBlock: [ :node | node name, String cr, ‘ number of methods: ', node methods size asString ]; items: Collection withAllSubclasses; "rowHeight: 50;” “does not work" openWithSpec In that case, each list item is composed by a class name on the first line, and the number of methods on the second line. For FTTableMorph the code looks like this: FTTableMorph new extent: 650@500; selectRowIndex: 1; showFirstRowSelection; dataSource: (FTEasyListDataSource new elements: Collection withAllSubclasses; display: [ :node | Smalltalk ui theme newColumnIn: World for: { node name asStringMorph. (' number of methods: ', node methods size asString) asStringMorph }]); rowHeight: 50; beMultipleSelection; openInWindow Or do you propose another solution? Thanks! Juraj |
On 22/06/17 10:51, Juraj Kubelka wrote:
> Hi, > > I have a code like this: > > FastTableModel new > displayBlock: [ :node | node name ]; > items: Collection withAllSubclasses; > openWithSpec. > > Which works fine. But I would like to define row height for each item. > FTTableMorph has a method rowHeight:. > Is it possible? Sure. Not all properties of fasttable are exposed, and I never got a good answer on the design question of what and how to expose and propagate properties in Spec. I see the following design questions: Exposing all the Morphic properties makes for a stronger dependency on Morphic. Spec itself is written so it can be easily ported from one underlying widget & gui layer to another (bloc, cocoa, qt, less so for web?), and different layers have different properties. What is common and what needs adapters or even layer-specific code? When nesting components, how do properties propagate? Define once and reuse everywhere is the goal, but that requires defining where components can find property values: Theme, Application, Session. In Spec there is no model/API defined for that, and there is no systematic approach taken, just pragmatic choices. Stephan |
In reply to this post by Juraj Kubelka
What considerations are there to have individual row heights?
i.e. How close are we to having a spreadsheet interface like simplfied Excel? cheers -ben On Thu, Jun 22, 2017 at 4:51 PM, Juraj Kubelka <[hidden email]> wrote:
|
The way I understand FastTable, it is not possible to have each item with different height. Cheers, Juraj
|
that’s correct. There was a proposal to give it variable heights but I think it was never implemented. cheers! Esteban
|
Free forum by Nabble | Edit this page |