From: Lyle Johnson Date: 2002-03-01T08:59:08+09:00 Subject: Re: FXRuby: Reacting on changing values of FXDataTarget > How would I accomplish this?! You want to catch either the SEL_COMMAND or SEL_CHANGED message being sent by the data target after its value changes. For the FXRuby-0.99.189 release (which is also the released bundled with the latest Ruby installer for Windows) you'll need to first hack the "lib/fox/responder2.rb" file and add these lines: class FXDataTarget include Responder2 end (This has already been fixed for the next release.) Once you've applied that patch, try adding the following lines to your example program, right after the line that creates the "@selected" data target: @selected.connect(SEL_CHANGED) do |sender, sel, ptr| str = "Ruby tuesday..." idx = @selected.value @field.text = str[0...(idx-1)] + "[" + str[(idx-1)..(idx-1)] + "]" + str[idx..-1] end This tells FOX that when the slider data target's value changes, it should run this code block. We grab the current slider value, and then construct the modified string (where the idx'th character is surrounded by braces). And then we assign that string to the text field. Hope this helps, Lyle