Thanks!
I would just change it a bit. I would rather write
uplevel #0 $options(-xscrollcommand) $xview
This way the code is executed at the global level as it is
in Tcl/Tk for standard widgets.
CG
|--------+------------------------------------->
| | Chris Bennett |
| | <[EMAIL PROTECTED]> |
| | Sent by: |
| | [EMAIL PROTECTED]|
| | eforge.net |
| | |
| | |
| | 06/19/2001 03:51 PM |
| | Please respond to vtcl-user|
| | |
|--------+------------------------------------->
>-----------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Fax to:
|
| Subject: [vtcl-user] Broken scrollbar in mclist solved
|
|
|
>-----------------------------------------------------------------------------------------------------------|
Hi Everyone,
In my original post I wondered why the scrollbars attached to a
multicolumn listbox didn't work. After digging into the code, it
appears that the problem lies in
namespace eval ::mclistbox {
proc {::mclistbox::UpdateScrollbars} {w} {
...
eval $options(-xscrollcommand) $xview
...
}
There's one eval each for x and y scrolling. The problem is that
$options(-xscrollcommand) is defined with an alias by me in the vtcl
Attributes window during the design stage. The $options() variable
evaluates to '$widget(XScroll_1) xview' but the $widget() is unknown
because it's out of scope.
The fix was to add 'global widget' just after the proc statement and
everything works fine.
FYI.
-
Chris Bennett <[EMAIL PROTECTED]>
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/vtcl-user
_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/vtcl-user