wxruby

How do I restore a windows size and position in a wxRuby app?

Does anyone know of any sample code for restoring a window's position and size in wxRuby? ...

How do you copy and paste rich text to and from the wxRichTextCtrl?

I am using wxruby but as far as I can tell its not only a ruby problem. If I try to copy and paste rich text into the wxRichTextCtrl it loses all the formatting. What am I missing? Is there any way to make this work? ...

How to set a minimum size for a Window in wxRuby

Hi people! I'm doing a simple GUI using wxRuby. I have just only read the tutorials and FAQ on the official site of the gem, but there are just a few examples. I want to know if there's a way (i'm sure there is a way but i don't know how to implement it) to set a minimum size of the windows... For example, i want to set the minimum siz...

What resources exist for WxRuby: documentation, tutorials, samples?

I found the RubyForge documentation, which is a little tricky to navigate. There's a basic tutorial on the Ruby On Windows blog. But I've already moved on from that. What other WxRuby resources have you found useful? Or, if not WxRuby specifically, what Wx resources have you found useful from a Ruby perspective? ...

f.pos undefined?

simplified version of my problem require 'wx' Wx::App.run do f = Wx::Frame.new nil f.title= 'the potlee' f.size= Wx::Size.new( 200 , 500) f.pos= Wx::point.new(50,50) f.show end i get this error `method_missing': undefined method `pos=' for #<Wx::Frame:0x207d020> how can i set the size on the frame but not the position...

Help with Wx::HtmlListBox.hit_test (wxRuby, but should be similar to C++/Py/etc)

Hi. I am having some trouble with using hit test for htmllistbox in wxRuby. It seems to return some odd results, even when this is not over the control. The context is in a context menu event. I am able to use hit_test with ListCtrl, but I can't seem to get it to work. case when (ht = @htmllist.hit_test(@htmllist.screen_to_client ev...

Which widgets to use for a messenger

Hello I'm currently learning to program Ruby with GUI. And has chosen wxruby. But has never used wxwidgets before. So my question is, which widgets do I use for the users list, the message list (scrolling) and the input area ? Want to be able to choose font, color and use icons etc in the input area and the message list. And hoping to ...

wxruby and rubymsn

Hello I'm currently playing with wxRuby and RubyMSN to learn to program desktop-programs. I know it is a hard task instead of just crating a notepad etc, but I need a bigger task than a notepad. I now do manage to use them by them self, but I cant get them to work together. The problem is the loop. RubyMSN wants to have an endless loop...

Problem sending message to wxruby's StyledTextCtrl

I am using wxruby's StyledTextCtrl. I want to get direct function and pointer from the handle so that I can reuse some old codes written in C. But the output of the following code is "0, 0", which means send_msg() returns nothing but 0. require 'wx' module Wx App.run do frame = Frame.new nil, :title => "stc" stc = StyledTextC...

Embed webserver in desktop app: wxRuby and Sinatra

I would love to give my windows based desktop applications a web interface and vice versa. My desktop application is written in wxRuby and the webserver is Sinatra (using webrick). The simplest idea was just to mash them together, this does not work. This code does not work. The webserver and gui app do not run simultaneously. The...

Is there anyway to enable MultiSelect in the StyledTextCtrl

I've noticed that the StyledTextControl (Scintilla basically) in wxWidgets has a great feature that allows multi-selections of text, just like TextMate. However wxRuby doesn't seem to have the function calls to support that feature. I'm wonder if there is a way to enable it or if there might be a way I could rewrite that wrapper to inclu...

wxruby - Set max length of ComboBox

Is is possible to set the Max length of a ComboBox in wxruby? I have looked in the documentation but find nothing http://wxruby.rubyforge.org/doc/combobox.html But if i do my_combobox.methods.sort I get set_max_size and set_min_size in the list. But When I call it my_combobox.set_max_length(100) I only get undefined method 'set_max_le...

wxruby - Can I update the options of a ComboBox

I have a ComboBox that I fill dynamically by what the user enters in it. ursls = LOAD_FROM_FILE("urls.txt") my_combobox = ComboBox.new(self, -1, '', DEFAULT_POSITION, DEFAULT_SIZE, urls ) And when somebody submit I save the new url def submit(url) ... APPEND_TO_FILE("urls.txt",url) ... This works great, but the ComboBox is only upd...

Ruby GUI (non-complex layouts)

I've done quite a bit of research on Ruby GUI design, and it appears to be the one area where Ruby tends to be behind the curve. I've explored the options of MonkeyBars, wxRuby, fxRuby, Shoes, etc. and was just wanted to get some input from the Ruby community. While they're definitely usable, the development on each seems to have falle...

"gem install wxruby" but require 'wxruby' won't work

I did gem install wxruby on Win 7 and in Ruby 1.8.6 require 'rubygems' require 'wxruby' but it will say c:/ruby1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- wxruby (LoadError) from c:/ruby1.8.6/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' f...

How to write a wxRuby program that will just drawText and setPixel without going into main_loop?

I want to write a program that will constantly compute numbers, and draw on the window canvas, including drawing text and setting pixels. So the program probably cannot go into an event loop (the main_loop), because that will stop the computation of numbers. Is there a way just to draw the items without an event loop? Or, should a thr...

Can't add menu item using wxRuby

I am just starting to play with wxRuby, using the samples which come with it. However, I can't seem to add a menu item. I have tried a bunch of things, but here is what I want to do: class MinimalFrame < Frame def initialize(title) ... menu_file.append(Something, "&Something\tAlt-W", "Do something") menu_file.append(Wx::ID_EXIT,...

wxRuby - change TextCtrl Style property

I'm brand new to wxRuby, and just trying to figure things out. How do I change the style of the TextCtrl after it has been created. tb = Wx::TextCtrl.new(panel, -1, :style => Wx::TE_PASSWORD) Sets the text input properly, but is it possible to change this property after it has been created? tb = Wx::TextCtrl.new(panel, -1) tb.set_wi...

Ruby 1.9 compatible plotting / graphic library?

I feel like I have a simple desire that no one can satisfy: I want to be able to graph a set of points, and I am using Ruby 1.9.2. I would like to use Gruff or Scruffy, since these seem to be the easiest to use. However, they both rely on rmagick, and it seems that many other libraries do to. Rmagick isn't compatible with Ruby 1.9 thoug...