Re: Combo Box Odd Display Behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message
m_sabal said...

Yes this is an old thread, but it is still a current issue. I've spent way too much time trying to hunt it down, and have to call it quits for now and either move back to Euphoria 3/Win32 0.6 or jump to Java (eww).

I posted one way to fix this issue here:

http://openeuphoria.org/forum/m/117380.wc

This was what I said:

mattlewis said...

The problem appears to be in win32lib.ew:fDoCtlColor(). It's there apparently to override the foreground and background color selections for controls. Apparently, the themed settings are slightly different than non-themed settings, at leaast on XP. To turn it off, you can simply modify the function so that it always does:

    return {kMainMsg , -1} 

If you've been taking advantage of the features of win32lib that use this, of course, they won't work any more (I'm not familiar with the motivation, etc, for this function, so I can't really say more). I found a modification that fixes the issue with the static labels by checking to see if win32lib believes the control should be transparent. Again, in fDoCtlColor, update the if statement that checks for w32WinDefColor to read:

 
	if not equal( classBGColor[ctrl_Type[lControl]], w32BGTransparent ) and 
	not equal(ctrl_Bg_Color[lControl], w32WinDefColor) then 

That doesn't fix the combo's issues. I think the problem occurs with the Combo's edit box. Normally, those aren't transparent, so it doesn't get fixed by the transparency check, though the first suggestion, of making this function o NOOP fixes the combo box display.

For completeness, here is the simple example that demonstrates the issue:

include win32lib.ew  
constant Win1 = create(Window,"Strange",0,Default,Default,400,400,0),  
		TabCtl = create(TabControl,"",Win1,5,5,380,355,0),  
		Tab1 = create(TabItem,"First",TabCtl,0,0,0,0,0),  
		Label1 = create(CText,"Nothing important",Tab1,10,30,360,25,0),  
		Cbox1 = create(Combo,"",Tab1,20,80,250,100,0)  
WinMain(Win1,Normal)  

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu