Hello,
I didn't find any way to calculate or get the total height of a
listctrl (so the place is just big enough to avoid vertical
scrollbars, but not so large to leave free space at the bottom).
I tried combination of fontsize, getbestsize, get itemspacing, ... but
no sucess. Is it possible anyhow?
Hi,
Hello,
I didn't find any way to calculate or get the total height of a
listctrl (so the place is just big enough to avoid vertical
scrollbars, but not so large to leave free space at the bottom).
I tried combination of fontsize, getbestsize, get itemspacing, ... but
no sucess. Is it possible anyhow?
I remember doing something similar a while back, and I got it to work
on Windows using GetItemRect, i.e. something like this:
height = 0
for indx in xrange(self.GetItemCount()):
height += self.GetItemRect(indx).height
or something around these lines. You may want to consider adding the
ListCtrl header height to that number as well.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
ยทยทยท
On 16 May 2012 08:07, franz steinhaeusler wrote:
Many thanks for the tip. Yes I must add the column header height and
something more, so that the scrollbars dissapear. It don't has to be
exact. So I added a constant value of 40, and it should be find.