Page 1 of 1

ComboBox and MinVisibleItems

Posted: 11 May 2010, 12:45
by Mex
HI Timo

I found a possible bug in ComboBox!?

Property MinVisibleItems is not working correctly with Windows XP.
Lets say i have 20 items in list and set MinVisibleItems=30.
With Windows 7 all items are visible but with XP only 8 items.
With XP i must play with ListHeight to display all items.
ComCtl is 6.00.2900.5512

Is this a bug or am i missing something?

BR;
Meelis

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 17:53
by TiKu
Which value does the IntegralHeight property have? I've tested it on Windows XP SP3 and it works for me. I've used version 1.1.2 though - maybe I've already fixed the problem while fixing the high-DPI problems.

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 19:34
by Mex
Integralheight is set to True.
Im using also v 1.1.2.127.
Iv attached 2 screenshots.
also added sample project, with XP always 8 items are visible

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 21:33
by TiKu
Well, you think you're using version 6.x of comctl32.dll, but actually you're using version 5.x. As the docs state, MinVisibleItems requires version 6.0.
To make your app use version 6.x of comctl32.dll, add a manifest to it and call InitCommonControls as the very first command. Have a look at the sample projects that come with ComboListBoxControls, if you don't know how to do it.

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 21:37
by Mex
Hmm im using on my project (not this sample iv posted) manifest and call InitCommonControls, but still with XP it does not work.
Yor CB control is added to my own UserControl, must i call there also InitCommonControls?
Now im calling it only from my "main" project

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 21:45
by TiKu
If the combo box gets the XP theme, you can be sure, that comctl32.dll 6.0 is used.

Okay, you may have configured your Windows XP to use classic skin. In this case you won't be able to tell which version is used just by looking at the combo box. A tool like SysInternals Process Explorer, which can list the dlls that are used by process, can help you then.

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 21:48
by Mex
Yes cb gets xp theme skin and xp is not conf. to use classic theme or any other modification :(
It's very strange problem.

Re: ComboBox and MinVisibleItems

Posted: 11 May 2010, 22:08
by TiKu
You wrote that you've placed the combo box inside a user control. Does this still happen, if you place the combo box onto the form directly?
Could you please save the combo box settings to a file (by using the property pages or the SaveSettingsToFile method) and attach this file here?

I cannot reproduce this problem on Windows XP SP3 - neither with 96 dpi nor with 120 dpi.