def test_lib_agw_ribbonGalleryCtor(self):
     rib = RB.RibbonBar(self.frame,
                        wx.ID_ANY,
                        agwStyle=RB.RIBBON_BAR_DEFAULT_STYLE
                        | RB.RIBBON_BAR_SHOW_PANEL_EXT_BUTTONS)
     page = RB.RibbonPage(rib, wx.ID_ANY, "Appearance")
     primary_panel = RB.RibbonPanel(page, wx.ID_ANY, "Primary Colour")
     RB.RibbonGallery(primary_panel)
Esempio n. 2
0
    def PopulateColoursPanel(self, panel, defc, gallery_id):

        gallery = wx.FindWindowById(gallery_id, panel)
        
        if gallery:
            gallery.Clear()
        else:
            gallery = RB.RibbonGallery(panel, gallery_id)
            
        dc = self._bitmap_creation_dc
        def_item = self.AddColourToGallery(gallery, "Default", dc, defc)
        gallery.SetSelection(def_item)
        
        self.AddColourToGallery(gallery, "BLUE", dc)
        self.AddColourToGallery(gallery, "BLUE VIOLET", dc)
        self.AddColourToGallery(gallery, "BROWN", dc)
        self.AddColourToGallery(gallery, "CADET BLUE", dc)
        self.AddColourToGallery(gallery, "CORAL", dc)
        self.AddColourToGallery(gallery, "CYAN", dc)
        self.AddColourToGallery(gallery, "DARK GREEN", dc)
        self.AddColourToGallery(gallery, "DARK ORCHID", dc)
        self.AddColourToGallery(gallery, "FIREBRICK", dc)
        self.AddColourToGallery(gallery, "GOLD", dc)
        self.AddColourToGallery(gallery, "GOLDENROD", dc)
        self.AddColourToGallery(gallery, "GREEN", dc)
        self.AddColourToGallery(gallery, "INDIAN RED", dc)
        self.AddColourToGallery(gallery, "KHAKI", dc)
        self.AddColourToGallery(gallery, "LIGHT BLUE", dc)
        self.AddColourToGallery(gallery, "LIME GREEN", dc)
        self.AddColourToGallery(gallery, "MAGENTA", dc)
        self.AddColourToGallery(gallery, "MAROON", dc)
        self.AddColourToGallery(gallery, "NAVY", dc)
        self.AddColourToGallery(gallery, "ORANGE", dc)
        self.AddColourToGallery(gallery, "ORCHID", dc)
        self.AddColourToGallery(gallery, "PINK", dc)
        self.AddColourToGallery(gallery, "PLUM", dc)
        self.AddColourToGallery(gallery, "PURPLE", dc)
        self.AddColourToGallery(gallery, "RED", dc)
        self.AddColourToGallery(gallery, "SALMON", dc)
        self.AddColourToGallery(gallery, "SEA GREEN", dc)
        self.AddColourToGallery(gallery, "SIENNA", dc)
        self.AddColourToGallery(gallery, "SKY BLUE", dc)
        self.AddColourToGallery(gallery, "TAN", dc)
        self.AddColourToGallery(gallery, "THISTLE", dc)
        self.AddColourToGallery(gallery, "TURQUOISE", dc)
        self.AddColourToGallery(gallery, "VIOLET", dc)
        self.AddColourToGallery(gallery, "VIOLET RED", dc)
        self.AddColourToGallery(gallery, "WHEAT", dc)
        self.AddColourToGallery(gallery, "WHITE", dc)
        self.AddColourToGallery(gallery, "YELLOW", dc)

        return gallery
Esempio n. 3
0
 def addColours(self, panel, id):
     self.colours = RB.RibbonGallery(panel, id, name="")
     black = self.colours.Append(
         wx.Bitmap("Colours/black.bmp", wx.BITMAP_TYPE_BMP), id)  # Image
     self.colours.SetItemClientData(black, (0, 0, 0))  # Data
     red = self.colours.Append(
         wx.Bitmap("Colours/red.bmp", wx.BITMAP_TYPE_BMP), id)
     self.colours.SetItemClientData(red, (255, 0, 0))
     blue = self.colours.Append(
         wx.Bitmap("Colours/blue.bmp", wx.BITMAP_TYPE_BMP), id)
     self.colours.SetItemClientData(blue, (0, 0, 255))
     green = self.colours.Append(
         wx.Bitmap("Colours/green.bmp", wx.BITMAP_TYPE_BMP), id)
     self.colours.SetItemClientData(green, (0, 255, 0))
     white = self.colours.Append(
         wx.Bitmap("Colours/white.bmp", wx.BITMAP_TYPE_BMP), id)
     self.colours.SetItemClientData(white, (255, 255, 255))
     white = self.colours.Append(
         wx.Bitmap("Colours/white.bmp", wx.BITMAP_TYPE_BMP), id)
     self.colours.SetItemClientData(white, (255, 255, 255))
     self.colours.SetSelection(black)
     self.colours.Realize()