Using anything other than a font size of 10 causes display problems
Maybe I'm the only one that didn't know this quirk exists.
Using this code as an example openconsole
autodefine "OFF"
window win_main
OPENWINDOW win_main,0,0,707,660,@MINBOX,0,"Debug",&whandler_main
CONTROL win_main,@COMBOBOX,"",30,50,150,120,0,1
CONTROL win_main,@COMBOBOX,"",30,200,150,120,0,2
CONTROL win_main,@COMBOBOX,"",30,350,150,120,0,3
SETFONT win_main, "Arial", 8, 600, 0,1
SETFONT win_main, "Arial", 10, 600, 0,2
SETFONT win_main, "Arial", 18, 600, 0,3
WAITUNTIL win_main = NULL
closeconsole
END
SUB whandler_main 'handler
SELECT @MESSAGE
CASE @IDCREATE
CENTERWINDOW win_main
CASE @IDCLOSEWINDOW
CLOSEWINDOW win_main
ENDSELECT
RETURN
ENDSUB
Notice the bottom line of the dropdown rectangle.
With a font size of 8 or 10 (1st 2 comboboxes the line looks correct.)
Look at the 3rd one (size 12) the line has disappeared.
But wait,
even though the 1st one (size 8 ) looks fine now it really isn't.
bring the black consolewindow and cover the combos.
Now click somewhere on the parent window of the combos to bring it to the foreground.
Notice that the bottom line is a lot thicker. That's what I call bleedthrough but it's really an indication that part of the control/window is not updating correctly.
I spent a great deal of time figuring that out.
Larry
I see it.
My third combo box has no line at the bottom, even at the start. (Vista).
The same sort of thing is happening with the tabcontrol.
If you use the @border style when you create it then moving the console window over it a black line will appear above and below the control.
Larry
I've seen it before, doesn't happen with dialogs. My best guess is Windows is changing the requested size +1/-1 depending on the size of the font in the control.
I'll look into it.
Paul.
Don't see it as a major problem as long as we are aware of it.
With some combinations of font size and conrol size the band is 3 pixels wide.
Larry
No problems on my machine with your combo boxes Larry.
Using Vista.
Hugh
I can see the quirk on my XP laptop. I normally use the @CTCOMBODROPLIST style with combo boxes, and they display properly for me that way.
The only reason I'm using the simple version is to duplicate the way the font request works.
I've used the other kind without problem also.
Larry
font request uses a dialog.
Paul.