Prev: ttk::combobox in "clam" theme
Next: BLT
From: swan lee on 4 Jun 2010 07:00 hi all, from the doc of the spinbox, abou the -command option : Specifies a Tcl command to invoke whenever a spinbutton is invoked. The command recognizes several percent substitutions: %W for the widget path, %s for the current value of the widget, and %d for the direction of the button pressed (up or down). my goal is to know if up or down button is pressed, but the %d substitution return computer-crash (at least ;-) ) value. am i right or my code is wrong? best regards, swan
From: shitaki on 4 Jun 2010 07:21 On Jun 4, 4:00 pm, swan lee <sl1200...(a)gmail.com> wrote: > hi all, > from the doc of the spinbox, abou the -command option : > Specifies a Tcl command to invoke whenever a spinbutton is invoked. > The command recognizes several percent substitutions: %W for the > widget path, %s for the current value of the widget, and %d for the > direction of the button pressed (up or down). > > my goal is to know if up or down button is pressed, but the %d > substitution return computer-crash (at least ;-) ) value. > am i right or my code is wrong? > > best regards, > swan
From: WJG on 4 Jun 2010 07:54 Hi Swan, Welcome to the Google Gnocl Group. I think that your problem is not with gnocl, are you using Tk because there is no -command option in gnocl. The gnocl::spinButton, which is direct wrap arounf the GtkSpinButton widget has no handler to determine which of the control arrows has been pressed. http://library.gnome.org/devel/gtk/2.16/GtkSpinButton.html#GtkSpinButton.signals A gnocl::spinButton will respond to an -onValueChanged signal and return the value contained in the spinButton object, but does not have a %d substitution string. Will
From: swan lee on 4 Jun 2010 08:21 hi, very big sorry, i thought i post to comp.lang.tcl, not to the Google Gnocl Group.....
From: WJG on 4 Jun 2010 10:59
On Jun 4, 1:21 pm, swan lee <sl1200...(a)gmail.com> wrote: > hi, > very big sorry, i thought i post to comp.lang.tcl, not to the Google > Gnocl Group..... You did, it was my mistake... Will |