Exemple #1
0
    def __init__(self, parent, attr_fn, images):
        if isinstance(images, list):
            first_image = images[0]
        elif isinstance(images, dict):
            first_image = images[images.keys()[0]]

        empty_img = wx.BitmapFromImage(wx.EmptyImage(
            first_image.GetWidth(), first_image.GetHeight()))

        ViewField.__init__(
            self, parent, wx.StaticBitmap(parent, wx.ID_ANY, empty_img))
        self.images = images
        self.attr_fn = attr_fn
Exemple #2
0
 def __init__(self, parent, format_fn):
     ViewField.__init__(self, parent, wx.StaticText(parent, wx.ID_ANY, label=""))
     self.format_fn = format_fn
 def __init__(self, parent, format_fn):
     ViewField.__init__(
         self, parent, wx.StaticText(parent))
     self.format_fn = format_fn