hi, i was searching for an efect in wxruby like fxshutter from fxruby. http://www.fxruby.org/doc/examples.html is it possible to build an skeleton like this in wxruby? i am ruby beginner -- Posted via http://www.ruby-forum.com/.
Hello Gerard, Currently, there is nothing like that implemented in wxRuby. However, it shouldn''t be to hard in which to implement it. It would all have to be hand written, with buttons, and custom drawing. Right now, I don''t have time to write up an example. Sorry. L8ers, Mario Steele On 2/24/08, Gerard Rakoczy <lists at ruby-forum.com> wrote:> > hi, > i was searching for an efect in wxruby like fxshutter from fxruby. > http://www.fxruby.org/doc/examples.html > > is it possible to build an skeleton like this in wxruby? > > i am ruby beginner > > -- > 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/ http://rubyforge.org/projects/vwmc/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080224/8541a989/attachment.html
Gerard Rakoczy wrote:> i was searching for an efect in wxruby like fxshutter from fxruby. > http://www.fxruby.org/doc/examples.htmlThe nearest thing is wxToolBook, which allows multiple pages to be controlled (like a notebook), but using icon tools rather than tabs to switch between windows. Unfortunately this is one of the few new classes in wxWidgets 2.8 that isn''t currently ported in wxRuby. You could probably create a similar effect by using a ToolBar + using a Sizer to contain the main window, and swap and hide/show panels. alex
Hey guys, Well, I got some time to put something simple together. Fortunatly Alex, it''s not a fully attached type of deal, as looking at the original Fox example, it''s just like utilizing Wx::Notebook. What I''ve done, is a simple bit of code, that works similar to how FXShutter works, except for a few differences. One, it''s wxRuby, not Fox, so keep that in mind, but the basics of it, are these: shutter.rb Creates the class Wx::Shutter It has three Methods within it: Wx::Shutter.new(parent,id) Creates a New Shutter Object. Wx::Shutter#add_header(title) Creates a New Header Button, which will toggle the associated list of items with it. Returns the instance of Wx::Button used. Wx::Shutter#add_item(header,text,icon=NullBitmap) Add''s a new item to the Header in question (Using the returned Wx::Button). There is a Custom event created for notifying the programmer of when an item has been selected within the headings. ShutterEvent ShutterEvent#header Returns the Header Wx::Button associated with it. ShutterEvent#item Returns the 0 based index to item selected within the program itself. Included, is a simple example, that just shows how it works, with events executing and such, you should be able to use shutter.rb to do what you want, all you need to do, is create each panel, and hide them all, then simply show the one your interested in, or associated to the item in the list. Hope this helps you out, it''s not perfect, but has similar ideas as to what is being used in Fox. L8ers, On 2/25/08, Alex Fenton <alex at pressure.to> wrote:> > Gerard Rakoczy wrote: > > i was searching for an efect in wxruby like fxshutter from fxruby. > > http://www.fxruby.org/doc/examples.html > > The nearest thing is wxToolBook, which allows multiple pages to be > controlled (like a notebook), but using icon tools rather than tabs to > switch between windows. > > Unfortunately this is one of the few new classes in wxWidgets 2.8 that > isn''t currently ported in wxRuby. You could probably create a similar > effect by using a ToolBar + using a Sizer to contain the main window, > and swap and hide/show panels. > > > alex > > > _______________________________________________ > 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/ http://rubyforge.org/projects/vwmc/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080304/f1d36dc2/attachment.html -------------- next part -------------- A non-text attachment was scrubbed... Name: shutter.rb Type: application/octet-stream Size: 1971 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20080304/f1d36dc2/attachment.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: test_shutter.rb Type: application/octet-stream Size: 2365 bytes Desc: not available Url : http://rubyforge.org/pipermail/wxruby-users/attachments/20080304/f1d36dc2/attachment-0001.obj
That''s what i was looking for... thank you Mario, nice example :) On Tue, Mar 4, 2008 at 10:08 PM, Mario Steele <mario at ruby-im.net> wrote:> Hey guys, > > Well, I got some time to put something simple together. Fortunatly Alex, > it''s not a fully attached type of deal, as looking at the original Fox > example, it''s just like utilizing Wx::Notebook. What I''ve done, is a simple > bit of code, that works similar to how FXShutter works, except for a few > differences. > > One, it''s wxRuby, not Fox, so keep that in mind, but the basics of it, are > these: > > shutter.rb > Creates the class Wx::Shutter > It has three Methods within it: > > Wx::Shutter.new(parent,id) > > Creates a New Shutter Object. > > Wx::Shutter#add_header(title) > > Creates a New Header Button, which will toggle the associated list of > items with it. Returns the instance of Wx::Button used. > > Wx::Shutter#add_item(header,text,icon=NullBitmap) > > Add''s a new item to the Header in question (Using the returned > Wx::Button). > > There is a Custom event created for notifying the programmer of when an > item has been selected within the headings. > > ShutterEvent > > ShutterEvent#header > > Returns the Header Wx::Button associated with it. > > ShutterEvent#item > > Returns the 0 based index to item selected within the program itself. > > > Included, is a simple example, that just shows how it works, with events > executing and such, you should be able to use shutter.rb to do what you > want, all you need to do, is create each panel, and hide them all, then > simply show the one your interested in, or associated to the item in the > list. > > Hope this helps you out, it''s not perfect, but has similar ideas as to > what is being used in Fox. > > L8ers, > > > On 2/25/08, Alex Fenton <alex at pressure.to> wrote: > > > > Gerard Rakoczy wrote: > > > i was searching for an efect in wxruby like fxshutter from fxruby. > > > http://www.fxruby.org/doc/examples.html > > > > The nearest thing is wxToolBook, which allows multiple pages to be > > controlled (like a notebook), but using icon tools rather than tabs to > > switch between windows. > > > > Unfortunately this is one of the few new classes in wxWidgets 2.8 that > > isn''t currently ported in wxRuby. You could probably create a similar > > effect by using a ToolBar + using a Sizer to contain the main window, > > and swap and hide/show panels. > > > > > > alex > > > > > > _______________________________________________ > > 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/ > http://rubyforge.org/projects/vwmc/ > > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/wxruby-users/attachments/20080305/d133a864/attachment-0001.html