Paint events don't always refresh on Catalina

  1. ‹ Older
  2. 7 weeks ago

    Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO

    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

  3. Tim J

    Feb 11 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

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

  4. Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO
    Edited 7 weeks ago

    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

  5. Tim J

    Feb 11 Pre-Release Testers, Xojo Pro N. Phoenix, AZ
    Edited 7 weeks ago

    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:

    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

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

  6. Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO
    Edited 7 weeks ago

    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)

  7. Tim S

    Feb 11 Pre-Release Testers Canterbury, UK

    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.

  8. Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO

    not everything was being invalidated that needed to be

  9. Tim J

    Feb 11 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

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

  10. Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO

    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)

  11. Sam R

    Feb 11 Pre-Release Testers, Xojo Pro, Third Party Store Hengchun, Pingtung, Taiwan

    @Norman P Containers have always bee a tad odd in how they handle invalidate & paint

    You can say that again, and again, and again, and again...

  12. Norman P

    Feb 11 Pre-Release Testers, Xojo Pro outside LMAO

    when in doubt do it yourself :)
    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

  13. 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

  14. Tim J

    Feb 12 Pre-Release Testers, Xojo Pro N. Phoenix, AZ

    @Rudolf J Hi there,
    why don't you take tab panels

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

or Sign Up to reply!