From: <kim...@ya...> - 2005-07-26 15:54:07
|
Thanks for the reply, Phil. I was looking for that option too but I don't see that there is one. Is this something they've added in the new (yet to be released) version? Phil Edwards wrote: > On Mon, 2005-07-25 at 22:08 -0700, 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. >> > > > Un-check the 'editable' box for the component in the resource editor. > > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users > > -- John Henry |
From: <kim...@ya...> - 2005-07-26 16:23:59
|
Alex, No, choice is not the same as combo-box. Combo-box pulls down when you click on the list. As far as I can see, there is no "editabel" field for combo-box that I can see - which is really odd. I am assuming that the code acutally supports this option (somehow) - may be it's just a resource editor issue. Alex Tweedly wrote: > kim...@ya... wrote: > >> Thanks for the reply, Phil. >> >> I was looking for that option too but I don't see that >> there is one. >> Is this something they've added in the new (yet to be >> released) version? >> >> >> >> >> >>>> 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. > > Isn't that simply a "Choice" component ? > (That's a question - it's been a while since I looked them ....) > -- John Henry |
From: Alex T. <al...@tw...> - 2005-07-26 16:38:39
|
kim...@ya... wrote: >Alex, > >No, choice is not the same as combo-box. Combo-box >pulls down when you click on the list. As far as I >can see, there is no "editabel" field for combo-box >that I can see - which is really odd. I am assuming >that the code acutally supports this option (somehow) >- may be it's just a resource editor issue. > > Sorry, John, but I'm not following you. A Choice component looks like a single-line text field with a small down-arrow on the right. When you click on the down-arrow, a drop-down list of all the possible choices appears, with the current one selected. When you select one (by clicking on it), that line is selected, the drop-down disappears, and the single-line text field now shows the just-selected item. Clicking within the field does the same as clicking on the arrow (i.e. the list drops down) All the above is also true for a ComboBox, except that clicking within the field doesn't make the list drop down, it selects within the editable text field, where you can edit the current entry and submit that as your choice. (It's then up to the handler to decide if it wishes to add that to the list of acceptable choices, etc.) So as far as I can see (looking at the widgets sample from the sample launcher) - a Choice is a non-editable Combobox - Combobox is editable by default Am I still missing something ? -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/07/2005 |
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) > > * > |
From: Alex T. <al...@tw...> - 2005-07-26 16:09:55
|
kim...@ya... wrote: >Thanks for the reply, Phil. > >I was looking for that option too but I don't see that >there is one. > >Is this something they've added in the new (yet to be >released) version? > > > > > >>>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. >>> >>> Isn't that simply a "Choice" component ? (That's a question - it's been a while since I looked them ....) -- Alex Tweedly http://www.tweedly.net -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.338 / Virus Database: 267.9.4/57 - Release Date: 22/07/2005 |