sketchucation logo sketchucation
    • Login
    1. Home
    2. Finfa811
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    Finfa811

    @Finfa811

    10
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    Finfa811 Unfollow Follow
    registered-users

    Latest posts made by Finfa811

    • RE: SKUI - Retrieve text from Textbox when clicking button

      Exactly Dan, that was one of my mistakes. Finally I got it by myself, and now I understand the basics. Thank you in any case.

      posted in Developers' Forum
      F
      Finfa811
    • RE: SKUI - Retrieve text from Textbox when clicking button

      @sdmitch I've already fixed it. Thank you anyway.

      posted in Developers' Forum
      F
      Finfa811
    • SKUI - Retrieve text from Textbox when clicking button

      I'm trying SKUI and I have created a Window with a Textbox in this way:

          w = SKUI;;Window.new
          txt_box = SKUI;;Textbox.new( "" )
          txt_box.name = ;txt_name
          txt_box.position( 155, 27 )
          txt_box.width = 200
          w.add_control( txt_box )
      
          label = SKUI;;Label.new( 'Label', txt_box )
          label.position( 10, 30 )
          w.add_control( label )
      
          btn_cancel = SKUI;;Button.new( 'Cancel' ) { |control|
            return nil
            control.window.close
          }
          btn_cancel.position( -5, -5 )
          w.add_control( btn_cancel )
      
          btn_ok = SKUI;;Button.new( 'OK' ) { |control|
            control.window.close
          }
          btn_ok.position( -100, -5 )
          w.add_control( btn_ok )
      
          w.cancel_button = btn_cancel
          w.default_button = btn_ok
          w.show
      

      After that, I type something in the Textbox and I would like to retrieve the string when I click btn_ok. I know the string should be in txt_box.value, but I don't know how to update the value of the TextBox when clicking a button. It is always empty. Do you know how to do it?

      posted in Developers' Forum
      F
      Finfa811