mono / xwt

A cross-platform UI toolkit for creating desktop applications with .NET and Mono
MIT License
1.36k stars 241 forks source link

[TextCellView] Setting Ellipsize = EllipsizeMode.End hides all of the text #688

Open decriptor opened 7 years ago

decriptor commented 7 years ago

var textCell = new TextCellView { Ellipsize = EllipsizeMode.End }; This code results in no text being show

screenshot 2017-05-10 10 49 37
decriptor commented 7 years ago

ok, I made a mistake here. I forgot to set the text. However, when I do set the text it shows up as only .... It seems to ellipse all the text

sevoku commented 7 years ago

Cells do not expand by default, but this can be enabled manually:

var column = new ListViewColumn ("title");
var textCell = new TextCellView { Ellipsize = EllipsizeMode.End };
column.Views.Add (textCell, true) // <- the second parameter enables expansion
tree.Columns.Add (column);

This will tell the column to expand the cell to fill all available space. It behaves similar to an Xwt.Box. We should think about enabling expansion by default, but it can have other issues... so we need more testing.