ComboBox and MinVisibleItems

The place for threads about TimoSoft ComboListBoxControls
Post Reply
User avatar
Mex
Captain
Posts: 129
Joined: 24 Sep 2009, 19:47

ComboBox and MinVisibleItems

Post by Mex » 11 May 2010, 12:45

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

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: ComboBox and MinVisibleItems

Post by TiKu » 11 May 2010, 17:53

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
Mex
Captain
Posts: 129
Joined: 24 Sep 2009, 19:47

Re: ComboBox and MinVisibleItems

Post by Mex » 11 May 2010, 19:34

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
Attachments
cb.zip
(5.35 KiB) Downloaded 292 times
sc2.jpg
(22.87 KiB) Not downloaded yet
sc1.jpg
(12.8 KiB) Not downloaded yet

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: ComboBox and MinVisibleItems

Post by TiKu » 11 May 2010, 21:33

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
Mex
Captain
Posts: 129
Joined: 24 Sep 2009, 19:47

Re: ComboBox and MinVisibleItems

Post by Mex » 11 May 2010, 21:37

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

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: ComboBox and MinVisibleItems

Post by TiKu » 11 May 2010, 21:45

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

User avatar
Mex
Captain
Posts: 129
Joined: 24 Sep 2009, 19:47

Re: ComboBox and MinVisibleItems

Post by Mex » 11 May 2010, 21:48

Yes cb gets xp theme skin and xp is not conf. to use classic theme or any other modification :(
It's very strange problem.
Attachments
w7.jpg
(103.39 KiB) Not downloaded yet
sc3.jpg
(87.1 KiB) Not downloaded yet

User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: Unterföhring
Contact:

Re: ComboBox and MinVisibleItems

Post by TiKu » 11 May 2010, 22:08

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.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!

Post Reply