IonicWind Software

IWBasic => GUI Central => Topic started by: LarryMc on August 20, 2008, 10:44:09 AM

Title: Simple ComboBox Quirk
Post by: LarryMc on August 20, 2008, 10:44:09 AM
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

Title: Re: Simple ComboBox Quirk
Post by: Bruce Peaslee on August 20, 2008, 10:54:25 AM
I see it.

My third combo box has no line at the bottom, even at the start. (Vista).
Title: Re: Simple ComboBox Quirk
Post by: LarryMc on August 20, 2008, 11:19:55 AM
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
Title: Re: Simple ComboBox Quirk
Post by: Ionic Wind Support Team on August 20, 2008, 12:35:00 PM
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.

Title: Re: Simple ComboBox Quirk
Post by: LarryMc on August 20, 2008, 12:47:54 PM
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
Title: Re: Simple ComboBox Quirk
Post by: hugh on August 20, 2008, 09:47:53 PM
No problems on my machine with your combo boxes Larry.
Using Vista.

Hugh
Title: Re: Simple ComboBox Quirk
Post by: mrainey on August 21, 2008, 06:04:29 AM
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.
Title: Re: Simple ComboBox Quirk
Post by: LarryMc on August 21, 2008, 07:28:22 AM
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
Title: Re: Simple ComboBox Quirk
Post by: Ionic Wind Support Team on August 21, 2008, 08:57:49 AM
font request uses a dialog.

Paul.