Transparent Label Default

There’s been an update on <>. Please review this & place your own comments.

I participated in the feedback.

Just a small piece of code in the Open event of a window that makes all labels transparent :

for ii as integer = 0 to self.ControlCount-1 if self.control(ii) isa Label then Label(self.control(ii)).Transparent = True next

I’ve taken to subclassing almost all the built-in controls, e.g.

Label -> cLabel

So in this case, I’d just add an Open Event, then create a new Open Event Handler, and add
#if TargetWin32

Or make a subclass and set the default value for to in the

Horst, no idea i can do that. i only open when i add in some addition properties on the the subclassed control.

Nice. I didn’t know that shortcut either. I see that after making changes this way, the settings only apply to new instances of the subclass and not pre-existing ones. (Don’t know if this is a bug or not.)

To change existing subclass I still need to do it in code, usually in the Open event.

Thanks Tanner… didn’t know setting the transparent =true in the Inspector Behaviour only for new instance. Learn something new everyday

I must post a big thank you here for the Xojo engineers who have implemented the Windows labels default transparency in 2015R4.

It really changes life :slight_smile:

Michel, because of a release schedule here, I haven’t had much time to work with R4. Do you know if any of the other controls like Checkboxes, Radio buttons and Group Boxes that have transparency issues have changed?

Unfortunately, the fix is valid only for labels.

OK, thanks. Still a nice step in the right direction.

It’s not a bug. The property values are copied from the control class to the instance the moment you drag the control onto a window.

Yes. I’ll chime in as well with thanks for the change in defaults.