|
@@ -252,6 +252,8 @@ class SliderWidget(Pmw.MegaWidget):
|
|
|
else:
|
|
else:
|
|
|
createSlider(interior)
|
|
createSlider(interior)
|
|
|
self._widget['command'] = self._firstScaleCommand
|
|
self._widget['command'] = self._firstScaleCommand
|
|
|
|
|
+ self._widget.bind('<ButtonRelease-1>', self._scaleBtnRelease)
|
|
|
|
|
+ self._widget.bind('<ButtonPress-1>', self._scaleBtnPress)
|
|
|
|
|
|
|
|
# Check keywords and initialise options.
|
|
# Check keywords and initialise options.
|
|
|
self.initialiseoptions(SliderWidget)
|
|
self.initialiseoptions(SliderWidget)
|
|
@@ -391,6 +393,15 @@ class SliderWidget(Pmw.MegaWidget):
|
|
|
elif self._fUpdate:
|
|
elif self._fUpdate:
|
|
|
self._updateValue(event)
|
|
self._updateValue(event)
|
|
|
|
|
|
|
|
|
|
+ def _scaleBtnPress(self, event):
|
|
|
|
|
+ if self['preCallback']:
|
|
|
|
|
+ apply(self['preCallback'], self['callbackData'])
|
|
|
|
|
+
|
|
|
|
|
+ def _scaleBtnRelease(self, event):
|
|
|
|
|
+ # Do post callback if any
|
|
|
|
|
+ if self['postCallback']:
|
|
|
|
|
+ apply(self['postCallback'], self['callbackData'])
|
|
|
|
|
+
|
|
|
def _widgetBtnRelease(self, event):
|
|
def _widgetBtnRelease(self, event):
|
|
|
# Do post callback if any
|
|
# Do post callback if any
|
|
|
if self._fUpdate and self['postCallback']:
|
|
if self._fUpdate and self['postCallback']:
|