A class to draw a calendar.
__init__ |
Default class constructor |
AddSelect |
Add a selection of days. |
Center |
Calculate the dimensions in the center of the drawing area. |
DefParms |
Setup the default parameters. |
DrawBorder |
Draw a border around the outside of the main display rectangle. |
DrawCal |
Draw the calendar. |
DrawDayText |
Draw the day text. |
DrawFocusIndicator |
Draw the focus indicator |
DrawGrid |
Calculate and draw the grid lines. |
DrawMonth |
Draw the month and year titles. |
DrawNum |
Draw the day numbers |
DrawNumVal |
Draw the numeric values. |
DrawSel |
Highlight selected days. |
DrawWeek |
Draw the week days. |
GetCal |
Get the calendar days. |
GetColor |
Get a color. |
GetOffset |
Get the offset position. |
GetRect |
Get the display rectange list of the day grid. |
InitScale |
Set the default scale values. |
InitValues |
Default dimensions of various elements of the calendar. |
SetCal |
Calculate the calendar days and offset position. |
SetColor |
Set a color. |
SetMarg |
Set the margins. |
SetPos |
Set the position. |
SetSize |
Set the size. |
SetWeekColor |
Set the font and background color of the week title. |
SetWeekEnd |
Set the weekend backgrounds. |
CalDraw
¶A class to draw a calendar.
AddSelect
(self, list, cfont=None, cbackgrd=None)¶Add a selection of days.
Parameters: |
|
---|
Center
(self)¶Calculate the dimensions in the center of the drawing area.
DefParms
(self)¶Setup the default parameters.
DrawBorder
(self, DC, transparent=False)¶Draw a border around the outside of the main display rectangle.
Parameters: |
|
---|
DrawCal
(self, DC, sel_lst=[])¶Draw the calendar.
Parameters: |
|
---|
DrawDayText
(self, DC, key)¶Draw the day text.
Parameters: |
|
---|
DrawNumVal
(self)¶Draw the numeric values.
GetCal
(self)¶Get the calendar days.
GetColor
(self, name)¶Get a color.
Parameters: | name – one of the defined color names. |
---|
GetOffset
(self)¶Get the offset position.
GetRect
(self)¶Get the display rectange list of the day grid.
InitScale
(self)¶Set the default scale values.
InitValues
(self)¶Default dimensions of various elements of the calendar.
SetCal
(self, year, month)¶Calculate the calendar days and offset position.
Parameters: |
|
---|
SetColor
(self, name, value)¶Set a color.
Parameters: |
|
---|
SetMarg
(self, xmarg, ymarg)¶Set the margins.
Parameters: |
|
---|
SetPos
(self, xpos, ypos)¶Set the position.
Parameters: |
|
---|
SetSize
(self, size)¶Set the size.
Parameters: | size – a tuple/list with width and height |
---|
SetWeekColor
(self, font_color, week_color)¶Set the font and background color of the week title.
Parameters: |
---|
SetWeekEnd
(self, font_color=None, backgrd=None)¶Set the weekend backgrounds.
Parameters: |
|
---|