gpt4 book ai didi

c# - 如何在 Windows 窗体 (C#) 中设置列​​表框的确切高度?

转载 作者:可可西里 更新时间:2023-11-01 03:12:14 24 4
gpt4 key购买 nike

我在设置列表框的高度时遇到了一些困难。

这样的代码...

listbox1.Height = some_number;

... 仅适用于某些数字。似乎列表框的高度可能只是其元素高度的乘积。有没有办法“覆盖”这种行为?

最佳答案

尝试,

listbox1.IntegralHeight=false;
listbox1.Height=some_int_number;

关于c# - 如何在 Windows 窗体 (C#) 中设置列​​表框的确切高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1358111/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com