[wxruby-users] New problem: Newlines.

Mario Steele mario at ruby-im.net
Thu Jan 8 20:19:02 EST 2009


You need to make sure that you pass the TE_MULTILINE to the creation of the
TextCtrl, EG:

test2 = TextCtrl.new(frame, 10, "Output here!", Point.new(0,
501),Size.new(500, 25), TE_PROCESS_ENTER|TE_MULTILINE)

This will create a Multi-Line Text Control, which can display new lines, if
you create a TextCtrl without the TE_MULTILINE, it'll create a Single Line
Text Control, even though the sizer will resize it to look like it's a
Multi-Line Text control.

On Thu, Jan 8, 2009 at 4:29 PM, Tim Mcd <lists at ruby-forum.com> wrote:

> Alex Fenton wrote:
> > Tim Mcd wrote:
> >> would that screw with what is already in the main_loop too much?
> >>
> >
> > It should work OK, but you'll need to add something like
> >
> > Wx::Timer.every(50) { Thread.pass }
> >
> > to your main_loop. This will ensure that on Ruby 1.8 your non-GUI ruby
> > threads get execution time, otherwise they won't progress.
> >
> > Have a look at the threaded.rb and chat client examples in the samples
> > directory as they demonstrate threads and network programming.
> >
> > hth
> > alex
>
> Thanks!
>
> And the problem in the first post is this: When I run in, there is no
> linebreaks. I am trying to make it so that there ARE line breaks via the
> newline character.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>



-- 
Mario Steele
http://www.trilake.net
http://www.ruby-im.net
http://rubyforge.org/projects/wxruby/
http://rubyforge.org/projects/wxride/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20090108/844db0b9/attachment.html>


More information about the wxruby-users mailing list