From: <kim...@ya...> - 2005-07-27 04:38:03
|
Tiberiu, The code appears to be supporting this feature. However, when I add the line as instructed to the sample widget program, there is no effect. I can *still* type in the combo box field. BTW: I did wx.CB_READONLY and didn't do the import. Thanks, -- John > -----Original Message----- > From: Tiberiu Ichim [mailto:ti...@li...] > Sent: Tuesday, July 26, 2005 12:29 PM > To: kim...@ya... > Subject: Re: [Pythoncard-users] Making combo box select only > > > kim...@ya... wrote: > > >Hi list, > > > >Could someone please tell me how I can make a > >combo-box (or spin-list, and so forth) to be "select > >only"? In other words, the user can only select from > >one of the presented items but not allow to type > >anything in. > > > >Thanks, > > > > > I haven't checked, and you may want to read the wxpython docs and the > source for pythoncard, but I think you should be able to do something > like this: > > from wx.combobox import * > > class Raport(model.Background): > def on_initialize(self,event): > * self.components.my_combobox.SetWindowStyle(CB_READONLY) > > * > |