I have a column in a tableview where I would like ...
# tornadofx
m
I have a column in a tableview where I would like to set the text-alignment to "right". I tried this but the text ist still left-aligned:
Copy code
readonlyColumn("Preis", ArticleDTO::money).cellFormat {
                                text = it
                                tableColumn.isSortable = false
                                style {
                                    fontFamily = "monospace"
                                    textAlignment = TextAlignment.RIGHT
                                }
                            }
Am I doing something wrong? I wonder because the rest (fontFamily) works..
c
I think textAlignment can only influence text position within the node's space. It doesn't influence how the node sizes itself.
Have you checked to make sure the node is growing to fill the available space?
m
Thanks for your ideas, @Carlton Whitehead. In fact
alignment = Pos.BASELINE_RIGHT
did the trick. 🙂
👍 1