Last item in treeview not visible when XP visual styles enabled. Help!

P

pamela fluente

I am having a problem with the Treeview control.

I have 3 items in the Treeview. When I resize the form and the Height
of the Treeview decreases enough the vertical scrollbar appears.

The problem is that the vertical scrollbar appears NOT as soon as the
third item is covered by the bottom border of the treeview, but ONLY
when the *second* item is covered (and the third is already no more
visible).

This way I cannot access the third item, because the scrollbar does
not appear, when just this one is hidden.

If I disable XP visual styles, the Treeview works fine.

How can I fix this strange problem ? Is this some known behaviour?

-Pam
 
C

Christof Nordiek

Hi pamela

I once had the same problem. This occured when I was adding single nodes to
the treeview in a for loop.
IIRC I solved it, by adding BeginUpdate and EndUpdate around the loop

hth
Christof
 
P

pamela fluente

Hi pamela

I once had the same problem. This occured when I was adding single nodes to
the treeview in a for loop.
IIRC I solved it, by adding BeginUpdate and EndUpdate around the loop

hth
Christof


Hi Christof,

thanks for your help.

I think you are talking about a slightly different problem (I read
about that on the Internet).

My tree is already built (you can add nodes manually): what I am
talking about is a problem which occurs, not when the Treeview is
populated, but when it is resized.

It's quite strange, the vertical scrollbar appear too late and not
when it should. And this strange behavior happens only with visual
styles enabled.

-Pam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top