Graphical Ruby/Tk GUI designer?

Hi,

I need to design a GUI - are there any tools available? I don’t want to
use Java for my project, even though I’m familiar with the JFC/Swing,
but may have to since I’m not familiar with Tk.

Help? :slight_smile:

Thanks,
Asfand Yar

···


http://www.it-is-truth.org/

Asfand Yar Qazi wrote:

Hi,

I need to design a GUI - are there any tools available? I don’t want to
use Java for my project, even though I’m familiar with the JFC/Swing,
but may have to since I’m not familiar with Tk.

Allow me to clarify (I do this often ):

I would like a GUI designer tool for Ruby/Tk, like NetBeans, etc.

Thanks,
Asfand Yar

···

Hello Asfand,

Sunday, February 22, 2004, 6:44:49 PM, you wrote:

Asfand Yar Qazi wrote:

Hi,

I need to design a GUI - are there any tools available? I don't want to
use Java for my project, even though I'm familiar with the JFC/Swing,
but may have to since I'm not familiar with Tk.

Allow me to clarify (I do this often ):

I would like a GUI designer tool for Ruby/Tk, like NetBeans, etc.

There is nothing like this for TK.

But you could do things with the same speed (or faster) if you use the
layout managers.

···

--
Best regards,
Lothar mailto:mailinglists@scriptolutions.com

--- Lothar Scholz <mailinglists@scriptolutions.com> wrote: > Hello
Asfand,

There is nothing like this for TK.

But you could do things with the same speed (or faster) if you use the
layout managers.

Sure there is:

[n6tadam@laptop n6tadam]$ apt-cache show visual-tcl
Description: Tcl GUI builder
Visual Tcl is a freely-available, high-quality application development
environment. Written entirely in Tcl and generating pure Tcl should make
porting either unnecessary or trivial. Visual Tcl is covered by the GNU
General Public License insuring that it will remain in the capable hands
of the internet community. Visual Tcl has no relation to SCO Visual Tcl
or
the FREE Visual Tcl/Tk project.

Package name: visual-tcl

-- Thomas Adam

···

=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor" -- http://linuxgazette.net

"<shrug> We'll just save up your sins, Thomas, and punish
you for all of them at once when you get better. The
experience will probably kill you. :)"

-- Benjamin A. Okopnik (Linux Gazette Technical Editor)

___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

Hi,

···

From: Thomas Adam thomas_adam16@yahoo.com
Subject: Re: Graphical Ruby/Tk GUI designer?
Date: Mon, 23 Feb 2004 06:51:00 +0900
Message-ID: 20040222215053.4607.qmail@web41109.mail.yahoo.com

[n6tadam@laptop n6tadam]$ apt-cache show visual-tcl
Description: Tcl GUI builder
Visual Tcl is a freely-available, high-quality application development
environment. Written entirely in Tcl and generating pure Tcl should make
porting either unnecessary or trivial. Visual Tcl is covered by the GNU
General Public License insuring that it will remain in the capable hands
of the internet community. Visual Tcl has no relation to SCO Visual Tcl
or
the FREE Visual Tcl/Tk project.

Package name: visual-tcl

Ruby/Tk can load a Tcl script on its Tk interpreter.
Therefore, you’ll be able to use the output script of the GUI
builder. It is not difficult to control widgets generated by
the tcl script.
For example, when there is a Tcl/Tk script ‘entry.tcl’ as below,

-----< entry.tcl >------------------------------------
#!/usr/bin/wish

wm geometry . +30+30

frame .buttons
pack .buttons -side top -fill x
button .buttons.quit -text Quit -command exit
button .buttons.print -text Print -command {puts $e_val}
pack .buttons.quit .buttons.reset -side right

entry .buttons.e -textvariable e_val -relief sunken
pack .buttons.e -side left -fill x

you can load the script to Ruby/Tk and control widgets (generated
by the script) along the following lines.


$ /usr/local/bin/irb -r tk
irb(main):001:0> Tk.tk_call(‘source’, ‘entry.tcl’)
=> “”
irb(main):002:0> root = TkRoot.new
=> #<TkRoot:0x402bf2c8 @path=“.”>
irb(main):003:0> root.winfo_children
=> [#<TkFrame:0x402bcc94 @db_class=TkFrame, @container=nil, @visual=nil, @colormap=nil, @path=“.buttons”, @classname=“Frame”>]
irb(main):004:0> widgets = root.winfo_children[0].winfo_children
=> [#<TkButton:0x402b7a50 @path=“.buttons.quit”>, #<TkButton:0x402b6f60 @path=“.buttons.print”>, #<TkEntry:0x40236774 @path=“.buttons.e”>]
irb(main):005:0> btn_q, btn_p, ent = widgets
=> [#<TkButton:0x402b7a50 @path=“.buttons.quit”>, #<TkButton:0x402b6f60 @path=“.buttons.print”>, #<TkEntry:0x40236774 @path=“.buttons.e”>]
irb(main):006:0> ent[‘textvariable’]
=> “e_val”
irb(main):007:0> v = TkVarAccess.new(ent[‘textvariable’])
=> #<TkVariable: e_val>
irb(main):008:0> v.value = ‘foo bar’
=> “foo bar”
irb(main):009:0> btn_p.invoke
foo bar
=> “”
irb(main):010:0> Tk.mainloop


Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)