none
Disable Listview Items WordEllipsis? RRS feed

  • Question

  • Hi,
    I'm using a ListView with View set to Details. When text doesn't fit inside a column the LV seems to be using WordEllipsis (adds three periods to the end of words that aren't fully visible).

    My question, Is it possible to disable WordEllipsis on a LV (without reverting to ownedrawn LV)?
    Thanks!
    Friday, March 3, 2017 3:13 PM

Answers

  • You might want to reconsider and instead of using a ListView, use a DataGridView.

    Thanks, but I can't change the control.

    I was hoping there was an API that could change the LV items ellipsis setting. I'm basically copying the LV data into nicely formatted columns of text (when viewed with fixed width fonts), and added an option to copy the text based on column widths too, but then the ellipsis throws off the WYSIWYG sort of thing. ;)

    EDIT With some extra text measuring I got it working now. :)

    * If anyone does know of an API way to change a LV items ellipsis setting that would be interesting to know for possible future projects.


    • Marked as answer by Edgemeal Friday, March 3, 2017 6:30 PM
    • Edited by Edgemeal Friday, March 3, 2017 6:30 PM
    Friday, March 3, 2017 5:30 PM

All replies

  • Hi,
    I'm using a ListView with View set to Details. When text doesn't fit inside a column the LV seems to be using WordEllipsis (adds three periods to the end of words that aren't fully visible).

    My question, Is it possible to disable WordEllipsis on a LV (without reverting to ownedrawn LV)?
    Thanks!

    You might want to reconsider and instead of using a ListView, use a DataGridView.

    I say that because you can set the contents to wrap if it's longer than the cell's width:

    https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcellstyle.wrapmode(v=vs.110).aspx


    "One who has no vices also has no virtues..."

    Friday, March 3, 2017 4:16 PM
  • You might want to reconsider and instead of using a ListView, use a DataGridView.

    Thanks, but I can't change the control.

    I was hoping there was an API that could change the LV items ellipsis setting. I'm basically copying the LV data into nicely formatted columns of text (when viewed with fixed width fonts), and added an option to copy the text based on column widths too, but then the ellipsis throws off the WYSIWYG sort of thing. ;)

    EDIT With some extra text measuring I got it working now. :)

    * If anyone does know of an API way to change a LV items ellipsis setting that would be interesting to know for possible future projects.


    • Marked as answer by Edgemeal Friday, March 3, 2017 6:30 PM
    • Edited by Edgemeal Friday, March 3, 2017 6:30 PM
    Friday, March 3, 2017 5:30 PM