]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-14/grid_attr.py
   4 class TestFrame(wx
.Frame
): 
   8         wx
.Frame
.__init
__(self
, None, title
="Grid Attributes", 
  10         grid 
= wx
.grid
.Grid(self
) 
  14                 grid
.SetCellValue(row
, col
, "(%s,%s)" % (row
, col
)) 
  16         grid
.SetCellTextColour(1, 1, "red") 
  17         grid
.SetCellFont(1,1, wx
.Font(10, wx
.SWISS
, wx
.NORMAL
, wx
.BOLD
)) 
  18         grid
.SetCellBackgroundColour(2, 2, "light blue") 
  20         attr 
= wx
.grid
.GridCellAttr() 
  21         attr
.SetTextColour("navyblue") 
  22         attr
.SetBackgroundColour("pink") 
  23         attr
.SetFont(wx
.Font(10, wx
.SWISS
, wx
.NORMAL
, wx
.BOLD
)) 
  25         grid
.SetAttr(4, 0, attr
) 
  26         grid
.SetAttr(5, 1, attr
) 
  27         grid
.SetRowAttr(8, attr
) 
  30 app 
= wx
.PySimpleApp()