Module calendarcontrol :: Class CalendarCellAttributes
[hide private]
[frames] | no frames]

Class CalendarCellAttributes

source code

A class represnting appearance attributes for an individual day.

You should subclass this if you wish to change the appearance from the defaults

Instance Methods [hide private]
 
__init__(self) source code
 
__setattr__(self, k, v) source code
Bool
isrightaligned(self)
Is the number representing the day right aligned within the cell?
source code
Bool
ismiltime(self)
Are times shown in military (aka 24 hour) time?
source code
 
setforcellbackground(self, dc)
Set the cell background attributes
source code
 
setforlabel(self, dc, fontscale=1)
Set the attributes for the day label
source code
 
setfortime(self, dc, fontscale=1)
Set the attributes for the time of an event text
source code
 
setforentry(self, dc, fontscale=1)
Set the attributes for the label of an event text
source code
Bool
setscaledfont(self, dc, font, fontscale)
Changes the in the device context to the supplied font suitably scaled
source code
Method Details [hide private]

isrightaligned(self)

source code 

Is the number representing the day right aligned within the cell?

Returns: Bool
True is it should be shown right aligned

ismiltime(self)

source code 

Are times shown in military (aka 24 hour) time?

Returns: Bool
True is militart/24 hour format should be used

setforcellbackground(self, dc)

source code 

Set the cell background attributes

Colour

Parameters:
  • dc (wx.DC)

setforlabel(self, dc, fontscale=1)

source code 

Set the attributes for the day label

Colour, font

Parameters:
  • fontscale (float) - You should multiply the font point size by this number
  • dc (wx.DC)

setfortime(self, dc, fontscale=1)

source code 

Set the attributes for the time of an event text

Colour, font

Parameters:
  • fontscale (float) - You should multiply the font point size by this number
  • dc (wx.DC)

setforentry(self, dc, fontscale=1)

source code 

Set the attributes for the label of an event text

Colour, font

Parameters:
  • fontscale (float) - You should multiply the font point size by this number
  • dc (wx.DC)

setscaledfont(self, dc, font, fontscale)

source code 

Changes the in the device context to the supplied font suitably scaled

Parameters:
  • fontscale (float)
  • font (wx.Font)
  • dc (wx.DC)
Returns: Bool
Returns True if the scaling succeeded, and False if the font was already too small to scale smaller (the smallest size will still have been selected into the device context)