A calendar control class.
__init__ |
Default class constructor. |
AcceptsFocus |
Can it accept focus? |
AddSelect |
Add a selection. |
DecMonth |
Decrement the month by 1. |
DecYear |
Decrement the year by 1. |
DoDrawing |
Do the drawing. |
DrawFocusIndicator |
Draw the focus indicator or a border. |
DrawRect |
Draw a rectangle. |
DrawRectOrg |
Draw a rectangle. |
GetColor |
Get a color. |
GetDate |
Get the set calendar date. |
GetDay |
Get the set calendar day. |
GetDayHit |
Find the clicked area rectangle. |
GetMonth |
Get the set calendar month. |
GetYear |
Get the set calendar year. |
HideGrid |
Hide the calendar grid. |
HideTitle |
Hide the calendar title. |
IncMonth |
Increment the month by 1. |
IncYear |
Increment the year by 1. |
IsDayInWeekend |
Is the day in the weekend |
OnKeyDown |
Key down event handler. |
OnKillFocus |
Kill focus event handler. |
OnLeftDEvent |
Left double mouse click event handler. |
OnLeftEvent |
Left mouse click event handler. |
OnMiddleDEvent |
Middle double mouse click event handler. |
OnMiddleEvent |
Middle mouse click event handler. |
OnPaint |
The on paint event handler. |
OnRightDEvent |
Right double mouse click event handler. |
OnRightEvent |
Right mouse click event handler. |
OnSetFocus |
Set focus event handler. |
OnSize |
The on size event handler. |
ProcessClick |
Determine the calendar rectangle click area and draw a selection. |
SelectDay |
Select the day. |
SetBusType |
Set the calendar type to ‘BUS’. |
SetColor |
Set a color. |
SetCurrentDay |
Set the current day to today. |
SetDay |
Set the day. |
SetDayValue |
Set the day. |
SetMargin |
Set the margins |
SetMonth |
Set the Month. |
SetNow |
Get the current day. |
SetSelDay |
Set the days to highlight. |
SetSize |
Set the size. |
SetTextAlign |
Set the text allignment. |
SetWeekColor |
Set the week title color. |
SetYear |
Set the year. |
ShowWeekEnd |
Highlight the weekend. |
TestDay |
Test to see if the selection has a date and create event. |
Calendar
(wx.Control)¶A calendar control class.
__init__
(self, parent, id=-1, pos=wx.DefaultPosition, size=wx.Size(200, 200), style=0, validator=wx.DefaultValidator, name="calendar")¶Default class constructor.
Parameters: |
|
---|
AcceptsFocus
(self)¶Can it accept focus?
AddSelect
(self, list, font_color, back_color)¶Add a selection.
Parameters: |
|
---|
DecMonth
(self)¶Decrement the month by 1.
DecYear
(self)¶Decrement the year by 1.
DrawFocusIndicator
(self, draw)¶Draw the focus indicator or a border.
Parameters: | draw – True draws the focus indicator, False a border |
---|
DrawRect
(self, key, bgcolor='WHITE', fgcolor='PINK', width=0)¶Draw a rectangle.
Parameters: |
|
---|
DrawRectOrg
(self, key, fgcolor='BLACK', width=0)¶Draw a rectangle.
Parameters: |
|
---|
GetColor
(self, name)¶Get a color.
Parameters: | name – a valid color name, can be defined using SetColor |
---|
GetDate
(self)¶Get the set calendar date.
Returns: | the day, the month and the year |
---|
GetDay
(self)¶Get the set calendar day.
Returns: | the day |
---|
GetDayHit
(self, mx, my)¶Find the clicked area rectangle.
Parameters: |
|
---|
GetMonth
(self)¶Get the set calendar month.
Returns: | the month |
---|
GetYear
(self)¶Get the set calendar year.
Returns: | the year |
---|
HideGrid
(self)¶Hide the calendar grid.
HideTitle
(self)¶Hide the calendar title.
IncMonth
(self)¶Increment the month by 1.
IncYear
(self)¶Increment the year by 1.
IsDayInWeekend
(self, key)¶Is the day in the weekend
Parameters: | key – the day to check |
---|
OnKeyDown
(self, event)¶Key down event handler.
OnKillFocus
(self, event)¶Kill focus event handler.
OnLeftDEvent
(self, event)¶Left double mouse click event handler.
OnLeftEvent
(self, event)¶Left mouse click event handler.
OnMiddleDEvent
(self, event)¶Middle double mouse click event handler.
OnMiddleEvent
(self, event)¶Middle mouse click event handler.
OnPaint
(self, event)¶The on paint event handler.
OnRightDEvent
(self, event)¶Right double mouse click event handler.
OnRightEvent
(self, event)¶Right mouse click event handler.
OnSetFocus
(self, event)¶Set focus event handler.
OnSize
(self, evt)¶The on size event handler.
ProcessClick
(self, event)¶Determine the calendar rectangle click area and draw a selection.
SelectDay
(self, key)¶Select the day.
Parameters: | key – The day to select |
---|
SetBusType
(self)¶Set the calendar type to ‘BUS’.
SetColor
(self, name, value)¶Set a color.
Parameters: |
|
---|
SetCurrentDay
(self)¶Set the current day to today.
SetDay
(self, day)¶Set the day.
Parameters: | day – the day to select |
---|
SetDayValue
(self, day)¶Set the day.
Parameters: | day (int) – the day |
---|
SetMargin
(self, xmarg, ymarg)¶Set the margins
Parameters: |
|
---|
SetMonth
(self, month)¶Set the Month.
Parameters: | month (int) – the month |
---|
SetNow
(self)¶Get the current day.
SetSelDay
(self, sel)¶Set the days to highlight.
Parameters: | sel (list) – the list of days to highlight |
---|
SetSize
(self, set_size)¶Set the size.
Parameters: | set_size (tuple or wx.Size ) – the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform; |
---|
SetTextAlign
(self, vert, horz)¶Set the text allignment.
Parameters: |
|
---|
SetWeekColor
(self, font_color, week_color)¶Set the week title color.
Parameters: |
|
---|
SetYear
(self, year)¶Set the year.
Parameters: | year (int) – the year |
---|
ShowWeekEnd
(self)¶Highlight the weekend.
TestDay
(self, key)¶Test to see if the selection has a date and create event.
Parameters: | key – the day to test |
---|