Label inside ContainerControl, TabPanel does not erase old text on update

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:

That’s with Xojo 2016r4.1.

Is that a known issue, is there a work-around?

Yeah, I think this is fixed by turning the Transparent property off.

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?

Oh no! It’s getting worse:

If I do this in the CC’s Open event:

me.Transparent = false

Then, when running on OSX, it actually ENABLES transparency, causing visual mayhem. (Happens with Xojo 2016r4.1 but not with 2013r3.3 and RS)

This is totally screwed up.

[opinion on people setting their own background colors]

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.

I’m staying with 2013 for Windows builds for now.

It’s not a feature I heard of. Would you mind checking to see if it’s the Direct2D engine?

I have no idea what you mean.

2016r3 vs 2016r4

I don’t have 2016r3 available right now. But I filed a bug report:


Can you reproduce it?

Here on Windows 10:
Setting label ‘infoTxt’ Multiline ‘on’ and Transparent ‘on’, things seems to work properly.

Andre, what do you mean? You can reproduce the issue with my unmodified project, but you can fix the issue by turning Transparency on for the Label?

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.

(sorry for the late reply, i am just back here.)

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.

For the record, the issue appears to be fixed in 2017r1.1