Group:
The ticks on a KnobCtrl are incorrect if you make a call to SetTags() before SetAngularRange(), unless OnSize() is called, implicitly via an event or manually.
Attached is a script that reproduces the problem.
knob_bug.py (960 Bytes)
Group:
The ticks on a KnobCtrl are incorrect if you make a call to SetTags() before SetAngularRange(), unless OnSize() is called, implicitly via an event or manually.
Attached is a script that reproduces the problem.
knob_bug.py (960 Bytes)
Hi,
Group:
The ticks on a KnobCtrl are incorrect if you make a call to SetTags() before
SetAngularRange(), unless OnSize() is called, implicitly via an event or
manually.
This is a bit curious, as the code in KnobCtrl does exactly this:
def SetTags(self, tags):
"""
Sets the tags for L{KnobCtrl}.
:param `tags`: a list of integers ranging from `minvalue` to `maxvalue`.
"""
self._tags = tags
if min(tags) < self._minvalue:
self._minvalue = min(tags)
if max(tags) > self._maxvalue:
self._maxvalue = max(tags)
self.OnSize(None)
And your sample works perfectly for me. I don't need to
comment/uncomment any line. What version of KnobCtrl are you using? Is
the AGW from SVN? Platform? wxPython version?
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
On 23 February 2012 14:11, Const wrote:
Attached is a screen capture that shows the problem. Compare the left and right knobs: they should be the same.
Environment info: