Tk Bwidget on windows

Hello, I am trying to do a progress bar via the Tk BWidgets thing and
the following line taken from the (otherwise extremely helpful)
tutorialspoint ruby examples...

require 'tkextlib/bwidget'

....gives an error "TkPackage can't find package BWidget".

I am using ruby 193 on Windows. Any clues much appreciated. The normal
Tk things all seem to work fine... just stuck with the progressbar!

···

--
Posted via http://www.ruby-forum.com/.

Does bwidget work from tk code (not ruby)? Maybe there's something missing in the tk installation?

···

On 01/06/2012 07:41 AM, Jon Cooper wrote:

Hello, I am trying to do a progress bar via the Tk BWidgets thing and
the following line taken from the (otherwise extremely helpful)
tutorialspoint ruby examples...

require 'tkextlib/bwidget'

....gives an error "TkPackage can't find package BWidget".

I am using ruby 193 on Windows. Any clues much appreciated. The normal
Tk things all seem to work fine... just stuck with the progressbar!

Hello, I am trying to do a progress bar via the Tk BWidgets thing and
the following line taken from the (otherwise extremely helpful)
tutorialspoint ruby examples...

require 'tkextlib/bwidget'

....gives an error "TkPackage can't find package BWidget".

I am using ruby 193 on Windows. Any clues much appreciated. The normal
Tk things all seem to work fine... just stuck with the progressbar!

I'm not a Tk guy, but this works for me on 1.9.3p0 on Win7 32bit:

require 'tk'
require 'tkextlib/tile'

TkT = Tk::Tile

root = TkRoot.new { title 'Progressbar Demo' }
content = TkT::Frame.new(root) { padding '3 3 12 12' }.grid(:sticky =>
'nsew')
TkGrid.columnconfigure(root, 0, :weight => 1)
TkGrid.rowconfigure(root, 0, :weight => 1)

p = TkT::Progressbar.new(content) do
  orient 'horizontal'
  length 200;
  mode 'determinate'
end.grid(:column => 1, :row => 1, :sticky => 'we')

position = TkVariable.new
position.value = 20
p.variable = position

Tk.mainloop

Jon

···

---
Fail fast. Fail often. Fail publicly. Learn. Adapt. Repeat.
http://thecodeshop.github.com | http://jonforums.github.com/
twitter: @jonforums

--
Posted via http://www.ruby-forum.com/\.

Cheers for that. The Tile thing helps a lot. I think I am getting
somewhere now.

···

--
Posted via http://www.ruby-forum.com/.

Message-ID: <de6b2ecf18f98601961c2bd25be425d8@ruby-forum.com>

Hello, I am trying to do a progress bar via the Tk BWidgets thing and
the following line taken from the (otherwise extremely helpful)
tutorialspoint ruby examples...
require 'tkextlib/bwidget'
....gives an error "TkPackage can't find package BWidget".
I am using ruby 193 on Windows. Any clues much appreciated.

Probably you can get BWidget extension from ActiveTcl package.
Please copy BWidget library files on ActiveTcl to your Tcl/Tk (which is
used on your Ruby/Tk) library path.

Please try to run <ruby-lib-path>/tkextlib/pkg_checker.rb.
It will show which extension is available on your Ruby/Tk.

                                                            The normal
Tk things all seem to work fine... just stuck with the progressbar!

You can get a pure Ruby/Tk (with standard Tcl/Tk only) version of
progressbar widget class (progressbar.rb) at
<http://www.dumbo.ai.kyutech.ac.jp/~nagai/RubyTk/?����¾�Υ����ץ륹�����ץ�&gt;
(the page is written in Japanese).
It is an example of usage of place geometry manager and how to make a
composite widget class.

···

From: Jon Cooper <jon@jbc.me.uk>
Subject: Tk Bwidget on windows
Date: Sat, 7 Jan 2012 00:41:54 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
Department of Artificial Intelligence, Kyushu Institute of Technology

a simple example here on tkdocs (near the end of page):
http://www.tkdocs.com/tutorial/morewidgets.html

···

--
Posted via http://www.ruby-forum.com/.