It's also visible in the demo, if I click somewhere in the slider but
the click position rests the same, there are some positions, where
at least the value jumps with every click left and right from the mouse
arrow (value display +-10digts) and never comes to the pointed value.
XP, 2.5.3 (but was also in 2.2.2)
It's the same in widgets.exe from wxWidgets.
If you add in slider.py the following lines you'll find the effect
at mouse x-position for instance from 13 to 17 but not on 12 or 18.
EVT_LEFT_DOWN(slider, self.Lclick)
def Lclick(self, event):
self.log.WriteText('Mousepos. on slider: %s\n' % event.GetPosition())
event.Skip()
Have problems with SetPosition if wxSL_LABELS
but without not.
in the demo it's visiblie with:
slider = wxSlider(self, 100, 25, 1, 100,
style=wxSL_HORIZONTAL | wxSL_AUTOTICKS | wxSL_LABELS )
slider.Move( wxPoint(30, 60) )
slider.SetSize( wxSize(250, -1) )
EVT_SLIDER: have assertions with:
EVT_SLIDER(self.slider1.GetId(), self.OnSlider1)
_core.py 2792 assert len(args) == 2 + exepectedIDs
EVT_SLIDER(self.slider1, self.OnSlider1)
_core.py 2792 assert len(args) == 2 + exepectedIDs
EVT_SLIDER(self.slider1.GetId(), self.slider1, self.OnSlider1)
assert 'int' object has no attribut 'Connect'
but this works
EVT_SLIDER(self.slider1, self.slider1.GetId(), self.OnSlider1)
In the help I've found (wxCommandEvent): EVT_SLIDER(id, func).
In the chapter for the slider is nothing written
about EVT_SLIDER("Slider events are handled in the same way as a
scrollbar") but for a scrollbar I've to write
EVT_SLIDER(self.sb, self.OnSlider1).
Udo