【问题标题】:How do I get the Height of a ListViewItem in c#?如何在 c# 中获取 ListViewItem 的高度?
【发布时间】:2013-07-23 11:22:17
【问题描述】:

有没有办法知道 ListViewItem 的高度?

(我发现它取决于字体大小..)

谢谢, 耶胡迪特

【问题讨论】:

  • 你查看过ListViewItem.Bounds.Height的属性吗?
  • 我没有这样的属性...(可能是因为我使用 Visual-Web-Gui)
  • msdn.microsoft.com/en-us/library/… 您需要的每个属性。
  • 看到了-stackoverflow.com/questions/6706032/…,但是这个解决方案对我没有帮助
  • @judian 你怎么知道它没有帮助?有几种方法可以获得 ListViewItem 高度,但似乎它们都不适合你?

标签: c# winforms listview


【解决方案1】:

试试这个:

int xh = ListView.GetItemRect(itemIndex).Height;

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-12-09
    • 1970-01-01
    • 1970-01-01
    • 2019-07-28
    • 2021-10-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多