ribbonbar + aui

niki <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
Hello,

I am unable to find working example for ribbonbar + aui.  Either ribbon 
bar or AUI panes are partially drawn.
Attached file was tested with wxPython 4.0.6 / Ubuntu 19.04.

Any ideas?
Niki

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/fbd03200-a695-5c97-4687-7a08f219fe03%40vintech.bg.
aaa.py (text/x-python, 2 KB)
import wx
import wx.aui as aui
import wx.ribbon as RB


class Main(wx.Frame):
    def __init__(self):
        wx.Frame.__init__(self, None)

        self._ribbon = RB.RibbonBar(self, )
        self._ribbon.SetArtProvider(RB.RibbonAUIArtProvider())

        home = RB.RibbonPage(self._ribbon, wx.ID_ANY, "Examples", wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN))
        toolbar_panel = RB.RibbonPanel(home, wx.ID_ANY, "Toolbar", )
        toolbar = RB.RibbonToolBar(toolbar_panel, -1)

        toolbar.AddTool(wx.ID_ANY,  wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN))
        toolbar.AddTool(wx.ID_ANY, wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN))
        toolbar.AddSeparator()

        sel = RB.RibbonPage(self._ribbon, wx.ID_ANY, "Second", wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN))
        selection_panel = RB.RibbonPanel(sel, wx.ID_ANY, "Selection", )
        selection = RB.RibbonButtonBar(selection_panel)

        selection.AddButton(wx.ID_ANY, "Expand Vertically", wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN), "")
        selection.AddButton(wx.ID_ANY, "Contract", wx.ArtProvider.GetBitmap(wx.ART_FILE_OPEN), "")

        self._ribbon.Realize()

        ribbon_info = aui.AuiPaneInfo().Name('ribbon').CaptionVisible(0).Top().CloseButton(False).DockFixed()

        center_panel = wx.Panel(self)
        center_panel.SetBackgroundColour('#0099A0')
        center_panel_info = aui.AuiPaneInfo().Name('center_panel').Caption('Center').CenterPane()

        inner_panel3 = wx.Panel(self, size=(100,100))
        inner_panel3.SetBackgroundColour('#9900A0')
        inner_panel3_info = aui.AuiPaneInfo().Name('inner_panel3').Caption('Panel 3').Left()

        self._manager = aui.AuiManager(self)

        self._manager.AddPane(self._ribbon, ribbon_info)
        self._manager.AddPane(center_panel, center_panel_info)
        self._manager.AddPane(inner_panel3, inner_panel3_info)

        self._manager.Update()

if __name__ == '__main__':
    app = wx.App()
    frame = Main()
    frame.Show()
    app.MainLoop()
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.