Hello,
Neither Google nor the archives here helped.
Can a listbox be made read-only, so that the user cannot change the selections I made through code?
Cheers,
--
Edit
Edit: Work-around
Neither Google nor the archives here helped.
Can a listbox be made read-only, so that the user cannot change the selections I made through code?
Cheers,
--
Edit
#Not good: User can't scroll :-/ self.lb1.Disable()--
Edit: Work-around
def __init__(self, *args, **kwargs): ... self.lb1 = wx.ListBox(panel, style=wx.LB_MULTIPLE) sizer.Add(self.lb1,1, wx.ALL | wx.EXPAND ,5) self.lb1.Bind(wx.EVT_LEFT_DOWN, self.on_input_intercept) self.lb1.Bind(wx.EVT_KEY_DOWN, self.on_input_intercept) ... def on_input_intercept(self, event): # Do NOT call event.Skip(). The event dies here, ignoring the user's action. return
