From: Mark Kirby on
Could you post a sytax for this and I will see if I can help.
--
Posted via http://www.ruby-forum.com/.

From: Mark Kirby on
Could you post a sytax for this and i will see if i can help.
--
Posted via http://www.ruby-forum.com/.

From: Ivo Roupa on
Mark Kirby,

Now it's almost working. I have been able to copy the content of
text_box_1 to text_box_2 with the following code.

require 'wx'
include Wx

class MyFrame < Wx::Frame
def initialize
super(nil,
:id => -1,
:pos => DEFAULT_POSITION,
:title => 'EasyMacro',
:size => [900,600],
:style => DEFAULT_FRAME_STYLE,
:name => "Ivo"
)

@panel = Wx::Panel.new(self)

@text_box_1 = Wx::TextCtrl.new(@panel,
:id => 1,
:value => "Write your text here",
:pos => [0,50],
:size => [400,500],
:style => TE_PROCESS_ENTER ,
:validator => DEFAULT_VALIDATOR,
:name => 'TextCtrlNameStr_1'
)

@text_box_2 = Wx::TextCtrl.new(@panel,
:id => 2,
:value => "",
:pos => [450,50],
:size => [400,500],
:style => TE_READONLY,
:validator => DEFAULT_VALIDATOR,
:name => 'TextCtrlNameStr_2'
)

evt_text(@text_box_1.get_id()) {|event| show_text(event)}

show

end

def show_text(event)
text = @text_box_1.get_value()
@text_box_2.value = text
end

end

class MinApp < App
def on_init
frame = MyFrame.new
end
end

MinApp.new.main_loop


The only thing that I haven't been able to do is to change line in
text_box_1 when I click Enter.. Or any other key...

If you can help me with that I would be very appreciated.

Thanks in advance

Ivo Roupa

--
Posted via http://www.ruby-forum.com/.