[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby TK GUI question

Harry Truax

2/17/2006 2:04:00 PM

Hi,

I am writing a Ruby GUI TK application where the top-most portion of the
screen is a line of static menu buttons. I would like the remaining lower
portion of the screen to be dynamic - as an example, one of the top static
buttons is pressed, in response to that, another window appears in the
dynamic area where someone can press more buttons, someone presses on of
those, which then draws a data window, erasing the window which had the
buttons, then someone closes the data window which brings the user back to
the window which was drawn in response to the button press from the static
button in the top portion of the screen.

Any references to Ruby TK function names would be greatly appreciated.

Thanks,

Harry
5 Answers

G B-)

2/17/2006 7:46:00 PM

0

Harry Truax wrote:
> Hi,
>
> I am writing a Ruby GUI TK application ...
>
> Any references to Ruby TK function names would be greatly appreciated.

The Tcl/Tk manual is easy to find with google, for example:
http://www.tcl.tk/man/tcl8.4/TkCmd/co...

0. Ensure this works:
require 'tk'

1. To convert the Tk widget commands to Ruby class names, prepend "Tk"
and capitalise,
for example the Tcl/Tk "entry" command becomes the Ruby class
"TkEntry"

2. To apply an option, just use the tk option name without the leading
'-',
for example "-relief" is just "relief".

3. Options can be set in two different ways, either:
a. provide a hash of option value pairs, the option name is a string:
example { 'relief' => 'ridge', 'width'=>3 }
and hand this hash over as a parameter (you don't necessarily
need { } in a method call), or
b. provide a block, e.g. to new
entry = TkEntry.new(root) do
justify 'center'
width 3
borderwidth 3
relief 'ridge'
end
# notice the option names are not quoted here, but look like
method names


The other thing you might want to do is take a look at this Ruby/Tk
tutorial
http://members.chello.nl/~k.vangelder/rub...

I haven't read this, but it looked interesting:
http://www.syngress.com/book_catalog/183_Ruby/...

HTH
GB-)

>
> ------=_NextPart_000_001F_01C633A1.09678BD0--

3jane.

2/9/2010 11:56:00 PM

0

> > You seem like a nasty ass bitter
> > person, I hope your mortgage goes south.  You wish bad things on
> > people so bad things should happen to you.  What would anything you
> > have said here make anyone think differently?
>
> You seem like a real sweetheart. Hugs and kisses, sweetie and
> don't forget to take your meds.

I am a real sweetheart. Many people on this ng will vouch for it.
Yourself? Tons of them lining up to say what a great guy Ken
Fortenberry is?
Have a nice mortgage, scumbag. If mercy's in business, I wish it for
you. Holy allah, how hard does someone have to try to be a
douchebag? You are joking, right? You're not really this much of a
tool, right?

Ken Fortenberry

2/10/2010 12:22:00 AM

0

3jane. wrote:
> I am a real sweetheart. Many people on this ng will vouch for it.
> Yourself? Tons of them lining up to say what a great guy Ken
> Fortenberry is? ...

LOL !! You're talking about character references from a group
of Usenet personas most of whom won't even use their real names.
Are you insane ? Oops, sorry ... no need to answer that.

--
Ken Fortenberry

marcman

2/10/2010 12:32:00 AM

0

On Feb 9, 7:22 pm, Ken Fortenberry <kennethfortenbe...@gmail.com>
wrote:
> 3jane. wrote:
> > I am a real sweetheart. Many people on this ng will vouch for it.
> > Yourself?  Tons of them lining up to say what a great guy Ken
> > Fortenberry is? ...
>
> LOL !! You're talking about character references from a group
> of Usenet personas most of whom won't even use their real names.
> Are you insane ? Oops, sorry ... no need to answer that.
>
> --
> Ken Fortenberry

He's talking about character references from the people of the
community that you chose to spend an awful lot of time in and amongst.

I've also noticed that most if not all of the reasonable people here
that don't post using their "real" names are known by their real names
to most every other reasonable person that posts here.

Ken, even the people that speak politely and pleasantly with you here
don't seem to like you very much.

You maybe shouldn't be such an asshole.

Just sayin'.

And I *know* you're reading this, as much as I know that O'Hara is
not. I bet you suck at Texas Hold 'em.

Garry the Island Boy

2/10/2010 3:14:00 AM

0

On Feb 9, 8:22 pm, Ken Fortenberry <kennethfortenbe...@gmail.com>
wrote:
> 3jane. wrote:
> > I am a real sweetheart. Many people on this ng will vouch for it.
> > Yourself?  Tons of them lining up to say what a great guy Ken
> > Fortenberry is? ...
>
> LOL !! You're talking about character references from a group
> of Usenet personas most of whom won't even use their real names.
> Are you insane ? Oops, sorry ... no need to answer that.
>
> --
> Ken Fortenberry

I have used my real name for years before moving to the islands and I
have seen you post some thoughtless and cruel things, does that count?

G.