Version 20 of Iwidgets

Updated 2009-04-22 14:15:43 by LV is where the CVS for iwidgets is maintained.

iwidgets (aka incr Widgets) is a set of megawidgets based on incr tcl and incr tk.

In the early life of itcl/itk/iwidgets, they were all three distributed in the same source tar file.

During 2001, a TIP was submitted proposing that the incr tcl be included as an extension distributed with Tcl.

Now that this proposal is being implemented in Tcl 8.6, users will need to download the tcl, tk, itk, and iwidgets tar files to get the pieces to use iwidgets.

See incr Widgets for a list of the widgets included in the set. [What do we do about the cases below which overlap with widgets that already existed in Tk, etc.?] In the case of overlap, just update the associated page with info about each of the items, and the extension with which it is associated.

This package is part of the ActiveTcl Batteries Included distribution.

LV Has anyone any experience using iwidgets with Tcl/Tk 8.5? I have gotten a report that widgets that used to be grey are now white and that the buttonplacement configuration parameter appears to be ignored for the distjointlistbox widget.

Here's a code example:

# ----------------------------------------------------------------------
#  DEMO: disjointlistbox in incr Widgets
# ----------------------------------------------------------------------
package require Iwidgets 4.0

iwidgets::disjointlistbox .dlb -buttonplacement center -lhslabeltext "Left Side" -rhslabeltext "Right Side"
pack .dlb -padx 10 -pady 10 -fill both -expand yes 

.dlb insertlhs {black white red blue yellow green magenta}

Run this code with a Tcl/Tk 8.4 system and iwidgets. The "left side" and "right side" buttons appear about the middle of the two listboxes. However, when I run this code with a Tcl/Tk 8.5 system (this is on SPARC Solaris), the left and right side buttons are aligned with the top of the two listboxes.

DKF: Since you need a new build of iwidgets with 8.5 anyway (because of forced changes to itcl due to VarReform) this should really be regarded as being a regression/bug in iwdgets itself. (Yes, I've got no idea what's wrong...)

LV That's certainly where I started. I suspect, regardless of the Tk change that caused the behavior, you are right - there should be something in the test suite to test such a thing. I suspect the test suite has various things missing.

In the comp.lang.tcl thread leading to Tk but ticket 2062394, I think the reporter indicates the Tk behavior that led to this has to do with a change in the default gravity behavior of grid that is being used in the widget. But I may be wrong. And I have no idea if the change was intentional or not...

In comp.lang.tcl, Uwe writes about what appears to be the cause of this [L1 ] - a change in the default behavior Tk 8.5's grid command. He has filed a trouble ticket on the Tk issue (ticket 2062394) as well as posted this work around for iwidget's disjointlistbox to be used in the meantime.

Here is a patch for disjointlistbox:
*** pkg/iwidgets4.0.2/scripts/disjointlistbox.itk       Tue Aug 12
--- new/iwidgets4.0.2/scripts/disjointlistbox.itk       Wed Aug 20
*** 462,467 ****
--- 462,470 ----
                  grid configure $itk_component(bbox) \
                          -in $itk_interior -row 0 -column 1 - columnspan 1 \
                                  -sticky nsew
+                 # Tk8.5: enforce compatibility to previous versions
+                 # see Tk-ticket 2062394
+                 catch {grid anchor $itk_component(bbox) center}

                  grid configure $itk_component(rhsbutton) \
                          -in $itk_component(bbox) -row 0 -column 0 - sticky ew 

LV This patch now looks to me to be a part of the current iwidgets cvs repository. That's great!

Also, for those of you following along at home, the same developer who asked me about this also reported as a difference the fact that his application, which previously was blue with this widget having a gray background, now is blue with this widget having a white background. At least one other developer also mentioned this, wondering if he was doing something wrong.

In our environment, upgrading the software is looked upon most kindly when users see no difference other than a difference intentionally coded in the application code itself. On comp.lang.tcl, I've had two suggestions for our developers - read up on option, options, and listbox, to see how to make use of the option command to set colors, or, somewhat hesitantly mentioned, tk::classic::restore.

CF: 2009-03-10 Has anyone tried running iWidgets examples on Linux with display on a Windows box via Cygwin/XWin, along with the Windows-based window manager (i.e. XWin -multiwindow)? The iwidgets::combobox, in particular, is rendered unusable when -dropdown is true, since the box appears to be visibly 'chopped off' when the drop-down button is clicked, making it difficult to make any selections. This doesn't occur when running separately in either Windows or Linux, or when the multiwindow option is turned off...

Learning Iwidgets