I don’t even understand how that can happen: I have a Label inside a CC which is placed on a TabPanel, and when I change the label’s Text, it draws the new text OVER the old one, leaving a mix of both on the screen. Like this:
Oh, and now I understand why that’s happening: I’m still editing the project in Real Studio, where CCs do NOT have a “Transparent” property. But when I open it in Xojo, it adds this prop, and it defaults to TRUE. That’s a bug - it should default to FALSE, agreed?
When I build with Xojo 2013r3.3, even though Transparent is True there as well, this issue does not occur on Windows.
So, it appears to be a regression. Or is that supposed to be a new feature?
Also, Tim’s work-around does not work for me: I’ve turned off the Transparent switch in both the control inside the Window as well as in the ContainerControl’s layout editor. Doesn’t help. Setting it to false inside its Open event doesn’t, either.
I also had the “EraseBackground” for the control in the Window set to False, but changing that to True is not helpful, either.
Thomas, indeed i can reproduce the problem with your program in Xojo 2016r2.1 and 2016r4 and both act correct when the Transparent property is set to on.
Huh, the fact that Transparent = true makes it non-transparent seems to be a bug, though, right?
Also, the fact that you can reproduce it in 2016r2 seems to answer Tim’s question, i.e. it’s not related to any recent changes to the Direct2D engine, if that’s what he meant.
No, Transparent = true makes it transparent, you can check that by assigning a backcolor to tmplView and then you can see that the label is transparent and the background color for the label also shows that backgroundcolor.
IMO setting the transparent property to true corrects the overwriting bug when this property is off. In both cases the label-text should not been overwritten but cleared and then newly written.