Resolved Listview and showintaskbar

Zexor

Well-known member
Joined
Nov 28, 2008
Messages
520
Programming Experience
3-5
I have a listview in a program and the data is acting strange when i minimized it. So i made a new program with just a listview with 1 column width 300 in small icon mode. I then made a button, when i click on it, it fills the listview with a bunch of 6-9 chars words. I made a 2nd button, that just set ShowInTaskbar to Not ShowInTaskbar.

After i click the first button, it will fill the listview with a 3 columns and 7 rows of words. But when i click the 2nd button, it turned into a single column and 20 rows of words.

I also notice that if i reduce the column width to around 70, this wont happen.

Why does that happen?
 
Last edited:
Hi,

I have had a quick play about with this and it sounds like you have once again anchored your list view to both left and right. It then sounds like you are resizing your form in some way when you press your second button, which in turn will resize the listview due to the anchoring.

If this is not the case then post what you have rather than keeping us guessing and we will try and give a better answer.

Cheers,

Ian
 
no, the listview stay the same size the whole time. maybe its the behavior of the default listview.
 
There are no columns in SmallIcon view, only Details view has columns. Still you may have columns defined for dynamic change of view at runtime.
What you described I can reproduce, and that is a bug. When you change ShowInTaskbar that causes the form and all controls to recreate their window handles, and that seems to mess up the view of the ListView somehow. A quick-fix I discovered is that after you have changed ShowInTaskbar you can set View to some value and back again to SmallIcon, that will rearrange the icons back to as they were.
 
Back
Top