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
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
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 S.
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
That’s what i was looking for… thank you Mario, nice example
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,
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs