From: Kevin A. <al...@se...> - 2002-03-28 08:21:29
|
> From: David Primmer > Sent: Thursday, March 28, 2002 12:03 AM > To: pythoncard-Users > Subject: RE: [Pythoncard-users] calendar component > > > How to turn off surrounding weekdays? I can't seem to set attributes for > those days so I don't want them displayed. If you mean wxCAL_SHOW_SURROUNDING_WEEKS, I hard-coded it in the style initialization for the Calendar component (see calendar.py) along with wxCAL_SHOW_HOLIDAYS. The appropriate solution is to make them style attribute for the component that can be set via the Property Editor in the resourceEditor... The same goes for all the styles: wxCAL_SUNDAY_FIRST Show Sunday as the first day in the week wxCAL_MONDAY_FIRST Show Monday as the first day in the week wxCAL_SHOW_HOLIDAYS Highlight holidays in the calendar wxCAL_NO_YEAR_CHANGE Disable the year changing wxCAL_NO_MONTH_CHANGE Disable the month (and, implicitly, the year) changing wxCAL_SHOW_SURROUNDING_WEEKS Show the neighbouring weeks in the previous and next months wxCAL_SEQUENTIAL_MONTH_SELECTION Use alternative, more compact, style for the month and year selection controls. That requires several files to be changed so I don't want to do it tonight. Since not all of the styles above are mutually exclusive, whether to have a boolean style attribute for each or a style list or something else is a design decision. We haven't really dealt with that for many of the other components, so the solution we choose will probably impact other parts of the framework such as the general background window style, which right now is not settable. I'll bring this up again on the list after I give it some thought. My initial thought is to use simple booleans as much as possible {'sundayFirst':0, 'showHolidays':1} and so on. Suggestions welcome. ka |