SegmentedControl to SegmentedButton

  1. last week

    Peter G

    Dec 1 Boston, MA

    I have a small 2019r1.1 app with a few SegmentedControls. I am trying to get everything in accord w. API 2.0 (2019r2.1). If i click on the popup and try to change SegmentedControl to SegmentedButton, it doesn't stick. Where am I going wrong? Does API 2.0 require you to delete the offending control and replace with a new one from scratch ?

    -image-

    The API 2.0 Guidelines explicitly point this out:

    The new SegmentedButton replaces SegmentedControl. You cannot just change the Super of a SegmentedControl to SegmentedButton, however. You will need to add a SegmentedButton and move your code over to events as appropriate.

  2. Derk J

    Dec 1 Pre-Release Testers, Xojo Pro

    Try to type it into the box an press enter?

  3. Peter G

    Dec 1 Boston, MA

    Tried that. no-go

  4. Dale A

    Dec 1 San Diego, California, USA
    Edited last week

    Yeah, I ran into the same issue. Derk, typing it into the box doesn't seem to stick either. I wound up having to move the old control out of the way, add in a new control and copy the code from the old one into the new one before trashing the old control.

    Feedback Case #58482

  5. Derk J

    Dec 1 Pre-Release Testers, Xojo Pro

    Another bug to go. Hope they fix it for R3

  6. Martin T

    Dec 1 Pre-Release Testers Answer Germany

    The API 2.0 Guidelines explicitly point this out:

    The new SegmentedButton replaces SegmentedControl. You cannot just change the Super of a SegmentedControl to SegmentedButton, however. You will need to add a SegmentedButton and move your code over to events as appropriate.

  7. Karen A

    Dec 1 Pre-Release Testers

    @MartinTrippensee The API 2.0 Guidelines explicitly point this out:

    That makes me wonder is there is any behavioral or visual differences (subtle or otherwise) between them or although they are different classes, is the code under teh hood exactly the same...

    While back I wrote a subclass to handle resizing the way i think it should work X-Platfrom , that enables the segments to have dropdown menus and some other stuff... and I wonder if it will all work right with a SegmentedButton.

  8. Dave S

    Dec 1 San Diego, California USA

    for macOS, the SegmentedControl is a native control, and if I remember from my Swift tests, it has basically the same sizing features as the Xojo one. So if SegButton has more/different (such as height) then it may have become a non-native control

    from what I can see they are identical

or Sign Up to reply!