ComoBox and DPI 120

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

ComoBox and DPI 120

Post by Mex »

Hi

1) Change Windows DPI to 120 (Large)
2) Add ComoBox to form
3) Set style to Edit field only

Run program.
Notice strange double border or box at the bottom of the control.
Attachments
border.png
(13.29 KiB) Not downloaded yet
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: ComoBox and DPI 120

Post by Mex »

Hmm i think its some paint issue
when style is set to Edit field only, you can resize the combobox and see what happens.
Attachments
border2.png
(25.4 KiB) Not downloaded yet
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

It seems to be at least partially related to the used font. Place a VB6 combo box and my combo box next to each other and configure both to use the same font (don't forget about the UseSystemFont property). With such a setup, my control is still wrong, but the failure is only 1 pixel instead of 2 as in your first screenshot.
I'll have to do more checks.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

I think I've fixed it. Could you please test the attached build, especially with different fonts?
Attachments
cblctls111123-rel.zip
Version 1.1.1.123
(2.32 MiB) Downloaded 620 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
Mex
Captain
Posts: 130
Joined: 24 Sep 2009, 19:47

Re: ComoBox and DPI 120

Post by Mex »

Hello

Yes, it's OK now, danke :)
Attachments
border3.png
(15.48 KiB) Not downloaded yet
anditop
Cadet
Posts: 7
Joined: 29 Apr 2010, 10:59

Re: ComoBox and DPI 120

Post by anditop »

Hi,

I have the same problem using the control with styles "Edit Field + Drop-Down List" and "Drop-Down List only":

With setting DPI 120 the control does not show the drop down when I click it. I only can change the items by cursor keys.

Updating and registering the new OCX Version 1.1.1 does not help. The problem still exists for drop downs.

Changing controls font settings does not change anything...

Do you have any idea?


Andreas
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

Have you played around with the ListHeight and MinVisibleItems properties? On which versions of Windows does this happen? Does your app use comctl32.dll 6, i.e. XP themes?
I'll have a look later.

P.S.: When changing the font, keep in mind that there is a UseSystemFont property which defaults to True.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
anditop
Cadet
Posts: 7
Joined: 29 Apr 2010, 10:59

Re: ComoBox and DPI 120

Post by anditop »

I played around with some properties. ListHeight and MinVisibleItem does not solve anything.

But: Changing the SelectionFieldHeight property let the control behave strange:
Behaviour 96 DPI: The SelectionField height is set to the property value, the Dropdown height depends on the item count => expected!
Behavior 120 DPI: The SelectionField height is set to default height, the Dropdown height is set to the property value => not expected!
See attached screenshots with SelectionFieldHeight=40.

Unfortunately this is not a solution or workaround because changing this property would only help for exactly one DPI value.

I tried all for WinXP SP2/Sp3 and Win7. There is no difference.

I also attached a very simple VB6-Project without any additional references (zip-file).

I hope this is helpful.
Attachments
120DPI_SelectionFieldHeight_40.PNG
(5.31 KiB) Not downloaded yet
96DPI_SelectionFieldHeight_40.PNG
(3.93 KiB) Not downloaded yet
TestCBLCtlsU_1.1.1.zip
(5.15 KiB) Downloaded 577 times
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

Many thanks, I'll try to fix this problem as soon as possible.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

anditop wrote:With setting DPI 120 the control does not show the drop down when I click it. I only can change the items by cursor keys.
One thing I found out so far (I had not yet much time to look at it): This problem doesn't occur, if the app uses themes, i.e. comctl32.dll 6.0. I also found out, that the drop-down list box temporarly is sized correctly while the control is loaded, but afterwards it is shrinked to 2 pixels for some reason.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

I'm getting a bit closer. I don't know what actually is going wrong, but I've found a possible work-around. It's not fully working yet, but I'm confident that I'll get it working.
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

Please try the attached build.
Attachments
cblctls112127-rel.zip
Pre-release of version 1.1.2 of ComboBoxControls.
(2.32 MiB) Downloaded 574 times
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
anditop
Cadet
Posts: 7
Joined: 29 Apr 2010, 10:59

Re: ComoBox and DPI 120

Post by anditop »

The first test with my simple dummy application was successful!
Good job!!

I will do some more tests (I hope I have enough time to do it the next days) and let you know ...

MANY THANKS
anditop
Cadet
Posts: 7
Joined: 29 Apr 2010, 10:59

Re: ComoBox and DPI 120

Post by anditop »

I am sorry but I had not much time to test the new version 1.1.2 in the last weeks.
Today I spended some more time with it.

I am also sorry to tell you that there are still problems with the combobox control:

If I set "Width" or "Height" property, the dropdown still is not shown with setting 120 dpi.

It is strange, because not all values of the properties effects the issue...

e.g. following values are affected:
ComboBox1.Width = 1500
ComboBox1.Height = 240

Do you have any idea?
User avatar
TiKu
Administrator
Administrator
Posts: 832
Joined: 28 Sep 2004, 21:10
Location: München
Contact:

Re: ComoBox and DPI 120

Post by TiKu »

I'll try to fix it. Combo boxes seem to be a big mess when it comes to non-standard dpi settings. I cannot remember another control that requires that much extra work to make it support non-standard dpi settings. For instance the date time picker control, that also has a drop-down portion, seems to work fine with non-standard dpi settings out out the box.

Some more information would be great:
- Do you use a manifest (version 6 of comctl32.dll)?
- On which version(s) of Windows does the problem occur?
Crunching for Fab36_Folding-Division at Folding@Home. Join Fab36/Fab30! - Folding@Home and BOINC
Boycott DRM! Boycott HDCP!
Post Reply