From: Selwyn M. <sel...@pa...> - 2004-07-09 07:46:19
|
hi Alex, thanks for trying to help. however the popup calendar I was referring to works like a textfield that pops up as a calendar rather than as a separate dialog. For the version of wxpython I have (i.e. 2.5.1.5u) the example is listed in the WxPython Overview -> Customcontrols -> PopupControl directory in the wxPython demo (not the pythoncard samples directory). I am trying to help ensure that valid dates are entered into my text fields. At the moment I have a rather inelegant validation checker that pops a dialog when a incorrectly formatted date is entered into the text field. I want to prevent my intended users from entering an invalid date by either including a popup calendar (or a masked edit control, which is also presented in the wxpython demo). Although a handy widget, the basic calendar simply occupies too much space on my already crowded forms. I guess what I would like is some advice on the necessary steps needed to wrap raw wxpython widgets in pythoncard, using either the popup menu or the masked edit controls as examples. thanks again, Selwyn Alex Tweedly wrote: > At 20:04 06/07/2004 +1200, Selwyn McCracken wrote: > >> hi there, >> >> in the wxPython demo there is a nifty popup calendar (i.e. >> PopupControl.py). > > > There are so many things in the wxDemo I'm not sure which one you mean > (neither of the two calendar demos I saw seemed to use PopupControl.py) > >> Could someone please give me a few pointers on how I would go about >> wrapping this and making it available in my pythoncard app. > > > So I won't answer your question directly, but will answer another, > hopefully related, one instead ... > > The easiest way to get a pop-up calendar is to create a Custom Dialog, > and put a calendar control (along with the OK and Cancel) buttons in it. > I've build a sample version, including a test program that uses it, - > you can download it via http://www.tweedly.net/Python/index.html > > Note - I did one additional thing: the simple way to select a date is to > click on the date (so it is highlighted), and then click on the OK > button. I made it possible to also double-click on a date and that will > immediately select that date and close the dialog. > > Hope that helps - but if not, can you say specifically what example in > wxDemo you are looking at, and what you want from it that you don't get > this way. > > Thanks > -- Alex. > > > ------------------------------------------------------------------------ > > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.714 / Virus Database: 470 - Release Date: 02/07/2004 |