• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

SKUI Textbox :onkey event getkey

Scheduled Pinned Locked Moved Developers' Forum
1 Posts 1 Posters 9.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    exchudy
    last edited by 15 Nov 2018, 15:14

    Hi

    I am trying to figure out is there a way, without changing SKUI wraper from thomthom, to get "ENTER" press event.

    I am using SKUI in my plugin, and because i am not very experienced in ruby, its very helpful. But i cant get this work.

    Any help will be welcome.
    Best regards

    my code:

    
    def testwindow
      window = SKUI;;Window.new( title; 'Test Window',
                                    width; 500,
                                    height; 210,
                                    resizable; false)
    
      txt = SKUI;;Textbox.new( 'nothing' )
      txt.position( 10, 10 )
      txt.width = 70
      txt.on( ;change) { |c| @promien = c.value }
      txt.on( ;keyup)     { |c| puts "keyup; #{c.value} '#{STDIN.getc}'"    }
      txt.on( ;keydown)   { |c| puts "keydown; #{c.value}"  }
      txt.on( ;keypress)  { |c| puts "keypress; #{c.value}" }
    
      window.add_control( txt )
    
    end
    
    
    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Buy SketchPlus
    Buy SUbD
    Buy WrapR
    Buy eBook
    Buy Modelur
    Buy Vertex Tools
    Buy SketchCuisine
    Buy FormFonts

    Advertisement