Null error when setting title of SegmentedControl item

  1. last year

    Marc

    1 Feb 2019 User since 2018

    I have a simple project with 1 window that has 2 controls: button and segmented control.

    In the DidShow event of the Window I did put this code:

    Button1.title = "Test1"
    SegmentedControl1.Item1.title = "Test2"

    The title of the Button is set correctly. I get the following error when setting the title of the segmented control:

    "Unable to find title into null object"

  2. marco

    2 Feb 2019 Administrator User since 2016

    Hi @Marc we'll look at the issue, it seems more natural to have all controls ready in the Window DidShow event. As a workaround you can move the SegmentedControl1.Item1.title = "Test2" code to the SegmentedControl1 Will/DidShow event.

or Sign Up to reply!