Resizing event for TextField?

  1. 5 months ago

    Markus W

    Jun 11 #JeSuisHuman New Zealand, Auc...

    I have a custom class of type TextField, let's call it cTF.

    When I lock a cTF to the sides of a window and then resize the window, the cTF resizes as well.

    When that happens I need to run some code in the cTF.

    But there is no resizing / resized event for TextFields.

    Is there a way to do this WITHOUT putting code in the window or putting the cTF on a ContainerControl? Basically I want all the code inside the cTF.

  2. Dave S

    Jun 11 San Diego, California USA

    create a method in your custom class... and have the Window Resize Event call that class

    Function WINDOW.RESIZE
        myTextfield.callSomeFunction
    End function

    this way the custom object controls HOW things are done, when the Window decides WHEN it will be done

  3. Markus W

    Jun 11 #JeSuisHuman New Zealand, Auc...

    @Dave S create a method in your custom class... and have the Window Resize Event call that class

    Thanks, but I am trying to do it

    WITHOUT putting code in the window

  4. Dave S

    Jun 11 San Diego, California USA

    @Markus W WITHOUT putting code in the window

    you can't

  5. Michel B

    Jun 12 Pre-Release Testers, Xojo Pro

    Use a 500 ms multiple timer to monitor your control's dimensions.

  6. Kevin G

    Jun 12 Pre-Release Testers, Xojo Pro Gatesheed, England

    The solution should have been to shadow the Width & Height properties but that doesn't work when constraints are used.
    Feedback Case #50397

or Sign Up to reply!