Example #1
0
    def SetAuthor(self, author):
        insertion_point = GetContainerItemCount(self.about_layout_V1) - 1

        self.about_layout_V1.Insert(insertion_point,
                                    wx.StaticText(self.t_about, label=author),
                                    0, wx.ALL | wx.ALIGN_CENTER, 10)

        self.t_about.Layout()
Example #2
0
    def SetDescription(self, desc):
        # Place between spacers
        insertion_point = GetContainerItemCount(self.about_layout_V1) - 1

        self.about_layout_V1.Insert(insertion_point,
                                    wx.StaticText(self.t_about, label=desc), 0,
                                    wx.ALL | wx.ALIGN_CENTER, 10)

        self.t_about.Layout()
Example #3
0
    def SetVersion(self, version):
        insertion_point = GetContainerItemCount(self.about_layout_V1) - 1

        app_label = wx.StaticText(self.t_about,
                                  label=u'{} {}'.format(APP_name, version))
        app_label.SetFont(bigfont)

        self.about_layout_V1.Insert(insertion_point, app_label, 0,
                                    wx.ALL | wx.ALIGN_CENTER, 10)

        self.t_about.Layout()
Example #4
0
    def SetWebsites(self, url_list):
        insertion_point = GetContainerItemCount(self.about_layout_V1) - 1

        link_layout = BoxSizer(wx.VERTICAL)
        for label, link in url_list:
            link_layout.Add(
                Hyperlink(self.t_about, wx.ID_ANY, label=label, url=link), 0,
                wx.ALIGN_CENTER, 10)

        self.about_layout_V1.Insert(insertion_point, link_layout, 0,
                                    wx.ALL | wx.ALIGN_CENTER, 10)
        self.t_about.Layout()
Example #5
0
    def SetGraphic(self, graphic):
        insertion_point = GetContainerItemCount(self.about_layout_V1) - 1

        if not isinstance(graphic, wx.Bitmap):
            graphic = wx.Image(graphic)
            graphic.Rescale(64, 64, wx.IMAGE_QUALITY_HIGH)
            graphic = graphic.ConvertToBitmap()

        self.about_layout_V1.Insert(
            insertion_point, wx.StaticBitmap(self.t_about, wx.ID_ANY, graphic),
            0, wx.ALL | wx.ALIGN_CENTER, 10)

        self.t_about.Layout()