FlatMenu by Andrea Gavana - how to set the default theme ?

Thank you for the prompt reply, one more question. Can i define my own
themes ? For example instead of "dark" theme to display something like
"blue" theme or something like that.
Thank you.

= = = Original message = = =

Hi Michael,

Hi, i have a problem with FlatMenu and i hope someone can help me. How can i
choose to load by default the dark theme and with no floating toolbar for
example ? No matter what i've tried i just can't set the
dark theme and " no floating toolbar" to
load by default. What files should i have
to edit and what's the code responsible for this ?

You can do something like this:

import FlatMenu as FM

# lots of code...

# For the appearance (darker scheme)
FM.ArtManager.Get().SetMenuTheme(FM.Style2007)
FM.ArtManager.Get().SetMBVerticalGradient(True)
FM.ArtManager.Get().SetMenuBarColour("Dark")

# For the toolbar
FM.ArtManager.Get().SetRaiseToolbar(False)

If you look at the source of ArtManager.py, there are some docstrings
that can help you. Otherwise I will be happy to help :smiley:

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/

···

On 5/21/07, michael michael wrote:

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

___________________________________________________________
Sent by ePrompter, the premier email notification software.
Free download at http://www.ePrompter.com.

Hi Michael,

Thank you for the prompt reply, one more question. Can i define my own
themes ? For example instead of “dark” theme to display something like

“blue” theme or something like that.

Well, you could hack the ArtManager.py source code, in the InitColours method:

def InitColours(self):
    """ Initialise the colour map. """

    self._colorSchemeMap = {"Default": wx.SystemSettings_GetColour(wx.SYS_COLOUR_3DFACE),
                            "Dark": wx.BLACK,
                            "Dark Olive Green": wx.NamedColour("DARK OLIVE GREEN"),
                            "Generic": wx.SystemSettings_GetColour(wx.SYS_COLOUR_ACTIVECAPTION)}

And add a new colour for the theme. I actually never did it, but you could try and see what happens if you add something like:

“BlueTheme”: wx.BLUE

And then select this theme.

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”
http://xoomer.virgilio.it/infinity77/

···

On 5/21/07, michael michael wrote: