Use ScrollWidth to get or set the logical width of the list box. When ScrollWidth is greater than the client width of the list box, the list box gets a horizontal scroll bar. When ScrollWidth is less than or equal to ClientWidth, the horizontal scroll bar disappears.
我问的是TListView,不是TListBox!!
begin
EnableScrollBar(ListView1.Handle, SB_VERT, ESB_DISABLE_BOTH); //建议~~// ShowScrollBar(ListView1.Handle, SB_VERT, False); //如下都是临时性的,ListView项发生改变后会恢复~~
// SetScrollRange(ListView1.Handle, SB_VERT, 0, 0, True);
end;