Paint events don't always refresh on Catalina

All I did was override both implementations of “Invalidate” and then have them actually invalidate each of the componenets
And got rid of refresh in favour of invalidates
And then booted into ccatalina to test it and it seems to work exactly as desired
http://great-white-software.com/miscellaneous/Screen%20Recording%202020-02-11%20at%201.46.27%20PM.mov

Yuuuupp! That got it. Adding the loop to call cvToolButton(i).Invalidate for each member of the array in the MouseUp fixed it.

here’s my mods

http://great-white-software.com/miscellaneous/TabTest.zip

FWIW it did misbehave here on 10.14.6 which is where I first made the changes

So, the moral of the story is - Don’t depend on a Control Array’s Paint event to update all members unless you manually force the refresh.

Here’s my modified code in the MouseUp event:

[code]tbIndex = index
System.Log(System.LogLevelDebug, CurrentMethodName + ": Index is " + Str(index) + ", tbIndex is " + Str(tbIndex))

ToolButtonClicked(index)

For i As Integer = 0 to 4
cvToolButton(i).invalidate
Next[/code]

I was just lucky with the way the Refresh works on the other platforms.

there’s no reason for it to update them all if they havent been invalidated

whether its a control set or individual controls really doesnt matter in this regard

the only thing a control set is saving you is writing the same code in the event handlers multiple times but even that is easily handled with individual controls (just use a method and pass each instance into the method on the form/cc/ etc)

So what is it that’s going on, then? It’s still unclear to me what the remedy is. I have a similar sounding issue on Linux, where the paint events for a control set don’t fire at all.

not everything was being invalidated that needed to be

So - that it worked on the other platforms since 2005 is a complete mystery???

Or something changed at some point but I dont recall that ever happening

Containers have always bee a tad odd in how they handle invalidate & paint
I dont recall either being automagically propagated to the controls they contained - you pretty much always had to, or should have, done it by hand
That way you could selectively update whatever was contained and NOT get tons of items repainted when maybe you only needed on repainted (or none - and just the containers background redrew)

You can say that again, and again, and again, and again…

when in doubt do it yourself :slight_smile:
I’ve pretty much always manually done something like overriding the invalidates in a container just to make sure what I want is invalidated and so gets redrawn as I expect

Hi there,
why don’t you take tab panels
is very simple
I use emoji for the lettering
is small but quite
and you can put lots of objects on the pages

https://www.dropbox.com/s/fm2kytfkwxl2slx/Tab-Panel-test.xojo_binary_project?dl=1

[quote=475089:@Rudolf Jackel]Hi there,
why don’t you take tab panels
[/quote]

Because I want consistent design and appearance on all 4 platforms - Linux, Pi, Windows, and macOS.