Ask a Question related to Ruby, Design and Development.
-
Sabyasachi Mustafi #1
Need some addition in Ruby/Tk
--Next_1068276139---0-203.199.83.28-9851
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
Hello all,=0A Our software is expected to be installed in this month. Af=
ter two months of extensive use of Ruby/Tk I have something to say about it=
. I think to make real life applications quickly we need more in the area o=
f Ruby/Tk as in the following.=0A=0A1. Tkcombobox should be added in the Ru=
by Distribution.=0A2. Both of the List box and combo box should have the op=
tion to provide two values as in Visual Basic (Bound Column)=0A3. Need some=
thing like Grid. I think there is TkTable but I am not sure about it.=0A=0A=
I have used 1.6 version. May be in 1.8 the problems are solved. What is=
your opinion?=0A=0AWith Regards,=0ASabyasachi Mustafi
--Next_1068276139---0-203.199.83.28-9851--
Sabyasachi Mustafi Guest
-
addition....
The half transparent grey square going on and off with the light switch is actualy to be a backgroung for a text MC. And the... -
Fields + Addition + Help
okay. I have a button. when user clicks the button, I want a field to add +1 to its total. this should be extremely easy to figure out for someone... -
Hyperlink HTML addition
I read on David's site how to get rid of the underline in hyperlinks: <style> a{text-decoration:none} </style> Can I put this somewhere on my... -
[ANN] ruby-freedb, ruby-serialport, ruby-mp3info moved to Rubyforge
http://ruby-freedb.rubyforge.org/ http://ruby-serialport.rubyforge.org/ http://ruby-mp3info.rubyforge.org/ bye! --... -
my passwords - XP home addition
every time the prompt comes up to remember a user name and password I check the box to have it remembered and it does not work. This is a major... -
Ferenc Engard #2
Re: Need some addition in Ruby/Tk
Hello,
Sabyasachi Mustafi wrote:Actually, combobox should be added to Tk. :-( There is at least five>
> Hello all,
> Our software is expected to be installed in this month. After two months of extensive use of Ruby/Tk I have something to say about it I think to make real life applications quickly we need more in the area of Ruby/Tk as in the following.
>
> 1. Tkcombobox should be added in the Ruby Distribution.
combobox implementations, none of which are part of the core (Tcl/)Tk
distribution. I use (strictly for prototyping, later I will replace it)
TixComboBox.
You can extend the widgets easily with addPair(), selectId(), text2id(),> 2. Both of the List box and combo box should have the option to provide two values as in Visual Basic (Bound Column)
currentId() functions, which simply manipulate a hash.
Yes, there is, and TkTable is great! I have written a wrapper to it, but> 3. Need something like Grid. I think there is TkTable but I am not sure about it.
didn't released it yet. You can download it from here:
[url]http://www.korus.hu/~fery/ruby/tktable.rb[/url]
In my opinion, the bare Tk without any extensions is a bit featureless
(no keyboard shortcuts, missing key widgets (combobox, grid etc.),
lacking framework for writing custom widgets...). If you use it from
tcl, it is compensated by the lots of widget and other libraries which
is available for tk. Unfortunately, if you use Tk from ruby, it is much
more harder to use these libs. Also, there are problems with the ruby/tk
implementation itself (e.g. callback and exceptions, maybe corrected in
CVS). If I could restart my (mainly GUI-oriented, database handling)
project, I think I would choose another GUI lib (or, shame, another
language). :-/
Regards,
Ferenc
Ferenc Engard Guest
-
Hidetoshi NAGAI #3
Re: Need some addition in Ruby/Tk
Hi,
From: "Sabyasachi Mustafi" <sabymus@rediffmail.com>
Subject: Need some addition in Ruby/Tk
Date: Sat, 8 Nov 2003 16:24:55 +0900
Message-ID: <20031108072219.9857.qmail@webmail18.rediffmail.co m>Which one do you talk about? There are some kinds of Ruby/Tk samples> 1. Tkcombobox should be added in the Ruby Distribution.
and Tcl/Tk extensions.
I'm sorry but I'm not a Visual Basic user. Please show me a sample> 2. Both of the List box and combo box should have the option to
> provide two values as in Visual Basic (Bound Column)
code (and its effects) that you are imaging.
Ruby/Tk depends on Tcl/Tk libraries linked to the tcltklib extension.> 3. Need something like Grid. I think there is TkTable but I am not
> sure about it.
Do you say that Tcl/Tk's grid geometry manager is not enough?
If so, you'll have to create a wrapper of Tcl/Tk's geometry managers.
Or you can try to use Tcl/Tk extensions (e.g. TkTable) on Ruby/Tk.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Hidetoshi NAGAI Guest
-
Nikolay Ponomarenko #4
Re: Need some addition in Ruby/Tk
Hello Hidetoshi,
Monday, November 10, 2003, 5:01:23 AM, you wrote:
HN> Which one do you talk about? There are some kinds of Ruby/Tk samples>> 1. Tkcombobox should be added in the Ruby Distribution.
HN> and Tcl/Tk extensions.
It'll be nice to use something like
Hugecombo
Hugelist
:)))
HN> Ruby/Tk depends on Tcl/Tk libraries linked to the tcltklib extension.>> 3. Need something like Grid. I think there is TkTable but I am not
>> sure about it.
HN> Do you say that Tcl/Tk's grid geometry manager is not enough?
HN> If so, you'll have to create a wrapper of Tcl/Tk's geometry managers.
HN> Or you can try to use Tcl/Tk extensions (e.g. TkTable) on Ruby/Tk.
There is an wrapper under TkTable written by
Ferenc Engard <ferenc(at) engard.hu>
May be it can be included into Ruby/Tk distribution ....
--
Best regards,
Nikolay
Nikolay Ponomarenko Guest
-
Ferenc Engard #5
Re: Need some addition in Ruby/Tk
Hello,
Sabyasachi Mustafi wrote:have something to say about it I think to make real life applications>
> Hello all,
> Our software is expected to be installed in this month. After two months of extensive use of Ruby/Tk I
quickly we need more in the area of
Ruby/Tk as in the following.Actually, combobox should be added to Tk. :-( There is at least five>
> 1. Tkcombobox should be added in the Ruby Distribution.
combobox implementations, none of which are part of the core (Tcl/)Tk
distribution. I use (strictly for prototyping, later I will replace it)
TixComboBox.
Column)> 2. Both of the List box and combo box should have the option to provide two values as in Visual Basic (Bound
You can extend the widgets easily with addPair(), selectId(), text2id(),
currentId() functions, which simply manipulate a hash.
Yes, there is, and TkTable is great! I have written a wrapper to it, but> 3. Need something like Grid. I think there is TkTable but I am not sure about it.
didn't released it yet. You can download it from here:
[url]http://www.korus.hu/~fery/ruby/tktable.rb[/url]
In my opinion, the bare Tk without any extensions is a bit featureless
(no keyboard shortcuts, missing key widgets (combobox, grid etc.),
lacking framework for writing custom widgets...). If you use it from
tcl, it is compensated by the lots of widget and other libraries which
is available for tk. Unfortunately, if you use Tk from ruby, it is much
more harder to use these libs. Also, there are problems with the ruby/tk
implementation itself (e.g. callback and exceptions, maybe corrected in
CVS). If I could restart my (mainly GUI-oriented, database handling)
project, I think I would choose another GUI lib (or, shame, another
language). :-/
Anyway, what tk extension library wrappers (e.g., bwidgets?) are
available for ruby?
Regards,
Ferenc
Ferenc Engard Guest
-
Hidetoshi NAGAI #6
Re: Need some addition in Ruby/Tk
Hi,
From: Ferenc Engard <ferenc@engard.hu>
Subject: Re: Need some addition in Ruby/Tk
Date: Fri, 14 Nov 2003 08:41:00 +0900
Message-ID: <3FB41689.1B1A917E@engard.hu>Why don't you create your Tkcombobox class?> Actually, combobox should be added to Tk. :-( There is at least five> > 1. Tkcombobox should be added in the Ruby Distribution.
> combobox implementations, none of which are part of the core (Tcl/)Tk
> distribution. I use (strictly for prototyping, later I will replace it)
> TixComboBox.
I think it is not so difficult.
You can find following samples on the Web.
[url]http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/18167[/url]
[url]http://www-ps.kek.jp/thitoshi/ruby/[/url]
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Hidetoshi NAGAI Guest
-
Ferenc Engard #7
Re: Need some addition in Ruby/Tk
Hidetoshi NAGAI wrote:
Well, with proficient look-and-feel and proper bindings (both on>
> Hi,
>
> From: Ferenc Engard <ferenc@engard.hu>
> Subject: Re: Need some addition in Ruby/Tk
> Date: Fri, 14 Nov 2003 08:41:00 +0900
> Message-ID: <3FB41689.1B1A917E@engard.hu>>> > Actually, combobox should be added to Tk. :-( There is at least five> > > 1. Tkcombobox should be added in the Ruby Distribution.
> > combobox implementations, none of which are part of the core (Tcl/)Tk
> > distribution. I use (strictly for prototyping, later I will replace it)
> > TixComboBox.
> Why don't you create your Tkcombobox class?
> I think it is not so difficult.
keyboard and mouse) it is not so small work IMHO...
Megawidgets in ruby...? I didn't try it yet, but sounds good... I have> You can find following samples on the Web.
>
> [url]http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-list/18167[/url]
some questions:
This is from tk.rb:
module TkComposite
include Tk
extend Tk
def initialize(parent=nil, *args)
[...]
What does it mean if a module has an initialize method? E.g.
class A
def initialize
...
end
end
class B < A
include TkComposite
def initialize
...
super # it calls TkComposite#initialize or A#initialize?
end
end
For automatically initializing a module, I wrote my own 'before' hack;
it was unnecessary? (Although, it calls the ascendant's method even if
super is not called...)
I will look about this TkComposite...
Ferenc
Ferenc Engard Guest
-
ts #8
Re: Need some addition in Ruby/Tk
>>>>> "F" == Ferenc Engard <ferenc@engard.hu> writes:
F> class B < A
F> include TkComposite
F> def initialize
F> ...
F> super # it calls TkComposite#initialize or A#initialize?
TkComposite#initialize
Guy Decoux
ts Guest
-
Hidetoshi NAGAI #9
Re: Need some addition in Ruby/Tk
Hi,
From: "Sabyasachi Mustafi" <sabymus@rediffmail.com>
Subject: Need some addition in Ruby/Tk
Date: Sat, 8 Nov 2003 16:24:55 +0900
Message-ID: <20031108072219.9857.qmail@webmail18.rediffmail.co m>I added new 4 sample scripts to CVS.> 1. Tkcombobox should be added in the Ruby Distribution.
1. tktextframe.rb : simple text frame with 'scrollbar 0N/OFF' method
2. tkballoonhelp.rb : simple balloon help widget
------<sample of usage>---------------------------------
TkButton.new('text'=>'This button has another balloon help') {|b|
pack('fill'=>'x')
TkBalloonHelp.new(b, 'text'=>'configured message',
'interval'=>500, 'font'=>'courier',
'background'=>'gray', 'foreground'=>'red')
}
--------------------------------------------------------
3. tkmultilistbox.rb : multiple listboxes with pane tabs
------<sample of usage>---------------------------------
f = TkFrame.new(nil, 'width'=>300,
'height'=>200).pack('fill'=>'both', 'expand'=>'true')
l = TkMultiListbox.new(f, 150,
[ ['L1', 100],
['L2', 200],
['L3', 50] ],
'titlefont'=>'courier',
'titleforeground'=>'yellow',
'titlebackground'=>'navy'
).pack('fill'=>'both', 'expand'=>true)
l.insert('end', [1,2,3])
l.insert('end', [4,5,6])
l.insert('end', [4,5,6], [4,5,6])
l.insert('end', ['aaaaaaaaaaaaaaa','bbbbbbbbbbb','ccccccccccccccccc '])
p l.columns(1)
p l.columns(1..3)
p l.columns(1,2)
--------------------------------------------------------
4. tkcombobox.rb : listbox with auto-scroll tab, and combobox widget
------<sample of usage>---------------------------------
v = TkVariable.new
e = TkCombobox.new(:height=>7, :scrollbar=>true, :textvariable=>v,
:startwait=>400, :interval=>200).pack
e.values(%w(aa bb cc dd ee ff gg hh ii jj kk ll mm nn oo pp qq rr ss))
#e.see(e.list_index('end') - 2)
e.value = 'cc'
TkFrame.new{|f|
fnt = TkFont.new('Helvetica 10')
TkLabel.new(f, :font=>fnt,
:text=>'TkCombobox value :').pack(:side=>:left)
TkLabel.new(f, :font=>fnt, :textvariable=>v).pack(:side=>:left)
}.pack
TkFrame.new(:relief=>:raised, :borderwidth=>2,
:height=>3).pack(:fill=>:x, :expand=>true,
:padx=>5, :pady=>3)
l = TkAutoScrollbox.new(nil, :relief=>:groove, :borderwidth=>4,
:width=>20).pack(:fill=>:both, :expand=>true)
(0..20).each{|i| l.insert('end', "line #{i}")}
TkFrame.new(:relief=>:ridge, :borderwidth=>3){
TkButton.new(self, :text=>'ON',
:command=>proc{l.scrollbar(true)}).pack(:side=>:le ft)
TkButton.new(self, :text=>'OFF',
:command=>proc{l.scrollbar(false)}).pack(:side=>:r ight)
pack(:fill=>:x)
}
--------------------------------------------------------
Those will be included in ext/tk/sample/ directory of 1.8.1-preview3.
Welcome to comments and bug reports.
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Hidetoshi NAGAI Guest



Reply With Quote

