Update TextArea from within class methode

  1. 5 months ago

    Hi,

    I would like to add text to a TextArea from within a class methode.
    The start of the class methode is triggered on the click of a button.

    Thanks

    Tim

  2. Walter P

    Feb 7 Testers, Xojo Pro

    Here's one way: Pass a reference to the TextArea as a parameter, e.g., aMethod(ta as TextArea, any other parameters you want), and in the button click you would write, aMethod(TextArea1, any other parameters you want[/i])

  3. Michael E

    Feb 8 Europe (Deutschland, Heggen)
    Edited 5 months ago

    Or build a method like this:

    Public Function MyEnhancementOfTA(extends ta as TextArea, x as string)
      // --------------------------------------------------------------------------------------------------
      // Enhancement of TextArea
      // --------------------------------------------------------------------------------------------------
      // --> ta is the actual TextArea 
      // --> x  i.e. an another import parameter
      // --------------------------------------------------------------------------------------------------
    
    .... and here is your code....
      
    End Function
     
  4. Thanks for all the feedback. I used a thread to solve the issue. The UserInterfaceUpdate methode can update a textArea.
    More info: https://docs.xojo.com/Thread.UserInterfaceUpdate

or Sign Up to reply!