Kirix Support Forums

small request for patches...

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

small request for patches...

Postby Infinity77 on Mon Dec 18, 2006 4:51 pm

Hi Ben,

I am a wxPython user, and I have translated (long time ago) wxAUI 0.9.2 to Python. Now that wxAUI is wrapped into wxPython, I don't need the Python version anymore.
However, there were a couple of nice patches for which I would like to ask if it is possible to integrate them in wxAUI:

1) The first one was created by astigsen and it was related to ModernDockArt, which basically uses wxUxTheme to draw theme-compliant buttons, backgrounds and so on. It is posted here: ... c.php?t=77

As for "standard" wxPython users it is very complicated to modify wxWidgets source and then compile wxPython using SWIG, would it be possible to integrate it in wxAUI, please?

2) I don't remember if this patch was posted or it was my Python implementation of it: sometimes it may be nice to draw "grips" within sashes to enphasize the sashes themselves. So I defined this style:


Then, in the DrawSash method:

Code: Select all
    def DrawSash(self, dc, orient, rect):

        dc.DrawRectangle(rect.x, rect.y, rect.width, rect.height)

        draw_sash = self.GetMetric(AUI_ART_DRAW_SASH_GRIP)
        if draw_sash:
            self.DrawSashGripper(dc, orient, rect)

The method DrawSashGripper is very easy:

Code: Select all
    def DrawSashGripper(self, dc, orient, rect):


        if orient == wx.HORIZONTAL:  # horizontal sash
            x = rect.x + int((1.0/4.0)*rect.width)
            xend = rect.x + int((3.0/4.0)*rect.width)
            y = rect.y + (rect.height/2) - 1

            while 1:
                dc.DrawRectangle(x, y, 2, 2)
                dc.DrawPoint(x+1, y+1)
                x = x + 5

                if x >= xend:


            y = rect.y + int((1.0/4.0)*rect.height)
            yend = rect.y + int((3.0/4.0)*rect.height)
            x = rect.x + (rect.width/2) - 1

            while 1:
                dc.DrawRectangle(x, y, 2, 2)
                dc.DrawPoint(x+1, y+1)
                y = y + 5

                if y >= yend:

You basically get this effect: ... pment.jpeg

I know that maybe the effect is small, but it might be useful. Sorry for the Python code, my knowledge of C++ is very limited.

Thank you for reading this.

Registered User
Posts: 12
Joined: Thu Jan 05, 2006 12:57 am
Location: Milan, Italy

Postby Ben on Tue Dec 19, 2006 1:07 am

Hi Andrea,

This is very nice stuff. Yes, I know about ModernDockArt (and like it very much!) There was a big rush to get wxAUI 0.9.3 ready to be integrated, including lots of bug fixes and name changes. In all this busyness I didn't have a chance, as I desired, to look into integrating ModernDockArt. This is something I still want to do.

As for the gripper code, I like it and will likewise discuss integrating it with the others. I might note that the GTK version has the grippers by default.

User avatar
Kirix Support Team
Posts: 525
Joined: Mon Dec 19, 2005 6:29 am

Return to wxAUI Questions, Thoughts & Feedback