Re: how does wxpython dynamically changes the content of Choice?
Tim Roberts <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Tim Roberts wrote: > 李进强 wrote: >> / The problem is that there are two Choice drop-down boxes in >> the UI, the content of the second box is initially empty, and when >> the user selects an option in the first box, the corresponding option >> appears in the second box。/ >> / For example, if the first box is month, the second box is >> day, and the user selects January, then the second box has 1... . 31, >> the user chooses February, the second frame is 1... 28。 / > > Think about your problem in words. When the user make a choice in the > first box, you want to fill the second box. So, you need to handle > the EVT_CHOICE event, and in that event, you fetch the month they > choice, clear out the days box, and fill it appropriately. > Also, if I may follow-up to my own message, you might consider using the wx.DatePickerCtrl, which displays a more friendly calendar for the user to pick a date. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc. -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/22967d78-2057-7a96-a6eb-909cd0df10c5%40probo.com.