wx.Slider.SetTickFreq()/SetTick() not working on 2.9.3.1/wxOSX-Cocoa?

This code simply doesn't work:

    self.scale_ctrl = wx.Slider(self, size=(120,-1), style=wx.SL_AUTOTICKS)
    self.scale_ctrl.SetMin(0)
    self.scale_ctrl.SetMax(16)
    self.scale_ctrl.SetTickFreq(4, 1)
    for x in [0, 4, 8, 12, 16] :
      self.scale_ctrl.SetTick(x)

I've tried different variations on this, and nothing works - either I
get no ticks (if I leave out wx.SL_AUTOTICKS), or a tick at every
increment on the slider. Is this simply broken, or is there an
obvious detail I'm mising?

thanks,
Nat

Hi,

···

On 11 July 2012 21:10, Nat Echols wrote:

This code simply doesn't work:

    self.scale_ctrl = wx.Slider(self, size=(120,-1), style=wx.SL_AUTOTICKS)
    self.scale_ctrl.SetMin(0)
    self.scale_ctrl.SetMax(16)
    self.scale_ctrl.SetTickFreq(4, 1)
    for x in [0, 4, 8, 12, 16] :
      self.scale_ctrl.SetTick(x)

I've tried different variations on this, and nothing works - either I
get no ticks (if I leave out wx.SL_AUTOTICKS), or a tick at every
increment on the slider. Is this simply broken, or is there an
obvious detail I'm mising?

http://wxpython.org/Phoenix/docs/html/Slider.html#Slider.SetTickFreq
http://wxpython.org/Phoenix/docs/html/Slider.html#Slider.SetTick

"Availability: Only available for MSW."

--
Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

    if mention_platform_and_version() and include_sample_app():
        send_message(email)
    else:
        install_malware()
        erase_hard_drives()
# ------------------------------------------------------------- #