New app and new widgets ;-)

Hi gang,
if you don’t mind, I would like to present my latest creature: it is called Symphony, and it will be used in our work to do pre and post-processing of our simulations. Here is a screenshot of Symphony using Luna blue theme (comments below) :

http://xoomer.alice.it/infinity77/Symphony_lunablue.png

And another screenshot that has the newly born family of FlatMenu and FlatMenuBar (thanks to Eran, as always), using Luna metallic theme:

http://xoomer.alice.it/infinity77/Symphony_metallic_FlatMenu.png

Sorry for the big PNGs (400 Kb), but I was unable to reduce them with the tools I have at home.

As for the comments:

  1. Astonishingly enough, PyAUI works again with wxPython 2.7, so I was able to tweak it and to use uxtheme.dll to paint the active/inactive panes using Windows XP native themes (notice the colour of active/inactive panes and also the small close button). I have done the same with ButtonPanel

  2. FlatMenu and FlatMenuBar are almost finished, but the nice shadows behind the menus that Eran was able to accomplish in C++ using uxtheme.dll still baffle me. It seems that in wxWidgets it is possible to do this:

class ShadowPopupWindow(wx.Window):
def init(self):
parent = wx.GetApp().GetTopWindow()

    if "__WXMSW__" in wx.Platform:

         style = wx.BORDER_NONE

wx.WANTS_CHARS | wx.POPUP_WINDOW
# So NOW it is a PopupWindow, not a wx.Window
pre = wx.PreWindow()
pre.Create(parent, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, style, “flat_menu”)

        self.CreateMSW()  # Creates the window using win32 functions

And then:

class FlatMenuBase(ShadowPopupWindow):

def __init__(self):

    ShadowPopupWindow.__init__(self)
    # So it is a wx.Window right now, because ShadowPopupWindow inherits from wx.Window
    
    if "__WXMSW__" in wx.Platform:
        parent = wx.GetApp().GetTopWindow()
        self.PostCreate(self.pre)
        # Uh??? How can I create a wx.Window if I am a subclass of wx.PopupWindow??
        wx.PopupWindow.Create(self, parent, wx.BORDER_NONE)

And I havent found a way to do that in wxPython, so I still don’t have shadows behind menus. But I think it is nice enough. FlatMenu and FlatMenuBar provide XP style and Office 2007 style menus, and:

A drop down arrow button to the right of the menu, it always contains the “Customize” option, which will popup an options dialog, the dialog functionality is not completed, but it will have:

  • Ability to add/remove menus (done)
  • Select different colour schems for the menu bar
  • Control various options, such as: colour for highlight menu item, draw border around menu (classic look only), display decorations for popup menus (menus which are not related to menu bar)
  • Ability to change accelerators for menu items (maybe after first release)

If the menu bar contains many menus and the frame size is too small to show all the menus, the last menus are hidden. Hidden menus are shown in the ‘more’ button, as you can see from Eran screenshots:

http://wxforum.shadonet.com/viewtopic.php?t=10497&start=15

I hope you liked Symphony :smiley:

Enjoy the screenshot… wxPython rules!

Andrea.

Hi Andrea,
Congratulations. This is the most beautiful 0.1 application I ever
saw! Did you use VTK as the 3D engine?
Stani

···

On 10/22/06, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi gang,
    if you don't mind, I would like to present my latest creature: it is
called Symphony, and it will be used in our work to do pre and
post-processing of our simulations. Here is a screenshot of Symphony using
Luna blue theme (comments below) :

http://xoomer.alice.it/infinity77/Symphony_lunablue.png

And another screenshot that has the newly born family of FlatMenu and
FlatMenuBar (thanks to Eran, as always), using Luna metallic theme:

http://xoomer.alice.it/infinity77/Symphony_metallic_FlatMenu.png

Sorry for the big PNGs (400 Kb), but I was unable to reduce them with the
tools I have at home.

As for the comments:

1) Astonishingly enough, PyAUI works again with wxPython 2.7, so I was able
to tweak it and to use uxtheme.dll to paint the active/inactive panes using
Windows XP native themes (notice the colour of active/inactive panes and
also the small close button). I have done the same with ButtonPanel

2) FlatMenu and FlatMenuBar are almost finished, but the nice shadows behind
the menus that Eran was able to accomplish in C++ using uxtheme.dll still
baffle me. It seems that in wxWidgets it is possible to do this:

class ShadowPopupWindow(wx.Window):
    def __init__(self):
        parent = wx.GetApp().GetTopWindow()

        if "__WXMSW__" in wx.Platform:

            style = wx.BORDER_NONE | wx.WANTS_CHARS | wx.POPUP_WINDOW
            # So NOW it is a PopupWindow, not a wx.Window
            pre = wx.PreWindow()
            pre.Create(parent, wx.ID_ANY, wx.DefaultPosition,
wx.DefaultSize, style, "flat_menu")
            self.CreateMSW() # Creates the window using win32 functions

And then:

class FlatMenuBase(ShadowPopupWindow):

    def __init__(self):

        ShadowPopupWindow.__init__(self)
        # So it is a wx.Window right now, because ShadowPopupWindow inherits
from wx.Window

        if "__WXMSW__" in wx.Platform:
            parent = wx.GetApp().GetTopWindow()
            self.PostCreate(self.pre)
            # Uh??? How can I create a wx.Window if I am a subclass of
wx.PopupWindow??
            wx.PopupWindow.Create(self, parent, wx.BORDER_NONE)

And I havent found a way to do that in wxPython, so I still don't have
shadows behind menus. But I think it is nice enough. FlatMenu and
FlatMenuBar provide XP style and Office 2007 style menus, and:

A drop down arrow button to the right of the menu, it always contains the
"Customize" option, which will popup an options dialog, the dialog
functionality is not completed, but it will have:
- Ability to add/remove menus (done)
- Select different colour schems for the menu bar
- Control various options, such as: colour for highlight menu item, draw
border around menu (classic look only), display decorations for popup menus
(menus which are not related to menu bar)
- Ability to change accelerators for menu items (maybe after first release)

If the menu bar contains many menus and the frame size is too small to show
all the menus, the last menus are hidden. Hidden menus are shown in the
'more' button, as you can see from Eran screenshots:

http://wxforum.shadonet.com/viewtopic.php?t=10497&start=15

I hope you liked Symphony :smiley:

Enjoy the screenshot... wxPython rules!

Andrea.

--

http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html

Hi Stani,

Congratulations. This is the most beautiful 0.1 application I ever
saw!

Thank you, I am glad you liked it :wink: . Building GUIs is becoming my constant job at work, as we have a lot of needs to scan and analyze the gazillion of results that come out of our massive simulations.

Did you use VTK as the 3D engine?

No, the plot you see has been done with matplotlib: it is just a fake plot, as I can not show the real one. However, the real one uses VTK to render our reservoir in 3D, with a lot of interaction with the user.

···

Andrea.

“Imagination Is The Only Weapon In The War Against Reality.”

http://xoomer.virgilio.it/infinity77/

Great job, looks very nice.

···

On 10/22/06, Andrea Gavana <andrea.gavana@gmail.com> wrote:

Hi gang,
    if you don't mind, I would like to present my latest creature: it is
called Symphony, and it will be used in our work to do pre and
post-processing of our simulations. Here is a screenshot of Symphony using
Luna blue theme (comments below) :

http://xoomer.alice.it/infinity77/Symphony_lunablue.png

And another screenshot that has the newly born family of FlatMenu and
FlatMenuBar (thanks to Eran, as always), using Luna metallic theme:

http://xoomer.alice.it/infinity77/Symphony_metallic_FlatMenu.png

Sorry for the big PNGs (400 Kb), but I was unable to reduce them with the
tools I have at home.

As for the comments:

1) Astonishingly enough, PyAUI works again with wxPython 2.7, so I was able
to tweak it and to use uxtheme.dll to paint the active/inactive panes using
Windows XP native themes (notice the colour of active/inactive panes and
also the small close button). I have done the same with ButtonPanel

2) FlatMenu and FlatMenuBar are almost finished, but the nice shadows behind
the menus that Eran was able to accomplish in C++ using uxtheme.dll still
baffle me. It seems that in wxWidgets it is possible to do this:

class ShadowPopupWindow(wx.Window):
    def __init__(self):
        parent = wx.GetApp().GetTopWindow()

        if "__WXMSW__" in wx.Platform:

            style = wx.BORDER_NONE | wx.WANTS_CHARS | wx.POPUP_WINDOW
            # So NOW it is a PopupWindow, not a wx.Window
            pre = wx.PreWindow()
            pre.Create(parent, wx.ID_ANY, wx.DefaultPosition,
wx.DefaultSize, style, "flat_menu")
            self.CreateMSW() # Creates the window using win32 functions

And then:

class FlatMenuBase(ShadowPopupWindow):

    def __init__(self):

        ShadowPopupWindow.__init__(self)
        # So it is a wx.Window right now, because ShadowPopupWindow inherits
from wx.Window

        if "__WXMSW__" in wx.Platform:
            parent = wx.GetApp().GetTopWindow()
            self.PostCreate(self.pre)
            # Uh??? How can I create a wx.Window if I am a subclass of
wx.PopupWindow??
            wx.PopupWindow.Create(self, parent, wx.BORDER_NONE)

And I havent found a way to do that in wxPython, so I still don't have
shadows behind menus. But I think it is nice enough. FlatMenu and
FlatMenuBar provide XP style and Office 2007 style menus, and:

A drop down arrow button to the right of the menu, it always contains the
"Customize" option, which will popup an options dialog, the dialog
functionality is not completed, but it will have:
- Ability to add/remove menus (done)
- Select different colour schems for the menu bar
- Control various options, such as: colour for highlight menu item, draw
border around menu (classic look only), display decorations for popup menus
(menus which are not related to menu bar)
- Ability to change accelerators for menu items (maybe after first release)

If the menu bar contains many menus and the frame size is too small to show
all the menus, the last menus are hidden. Hidden menus are shown in the
'more' button, as you can see from Eran screenshots:

http://wxforum.shadonet.com/viewtopic.php?t=10497&start=15

I hope you liked Symphony :smiley:

Enjoy the screenshot... wxPython rules!

Andrea.

--
I like python!
UliPad <<The Python Editor>>: UliPad - Woodpecker Wiki for CPUG
My Blog: http://www.donews.net/limodou

I'm on XP, with python 2.5 and wxPython 2.7.1.1
and I get an error trying run a demo outside the demo
application. am I doing something wrong?

I'm going through the different demo docs...
specifically looking at custom controls-> popup
control.

I copied the demo code and placed it into notepad++
and saved it as calendar1.py. I then opened it up in
IDLE and checked the code. its ok, no warnings.

When I run it, I get a popup message:
IDLE Subprocess Error
Socket Error: Connection refused.

I'm not using a network connection, am I?
I then get a dialog about exiting...
click no and get this in console:

Traceback (most recent call last):
  File "C:\mysql - python\examples2\calendar1.py",
line 93, in <module>
    run.main(['', os.path.basename(sys.argv[0])] +
sys.argv[1:])
  File "C:\Python25\lib\idlelib\run.py", line 82, in
main
    exit()
  File "C:\Python25\lib\idlelib\run.py", line 209, in
exit
    sys.exit(0)
SystemExit: 0

hello

···

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Idle uses a socket in order to run the shell/module in another process.
See this thread for more information:

- Josiah

···

Kenneth Long <kelong_2000@yahoo.com> wrote:

When I run it, I get a popup message:
IDLE Subprocess Error
Socket Error: Connection refused.

I'm not using a network connection, am I?
I then get a dialog about exiting...
click no and get this in console:

Idle uses a socket in order to run the shell/module
in another process.
See this thread for more information:

Thanks. This is helpful, but was not exactly the
cause of the "problem". I think the IDLE message is
misleading.. I temporally turned off my firewall, but
that did not resolve the issue.

I tried launching my test code from the command
prompt.
This gave me a better dianognistic message.
I needed to have run.py in the same folder. It was not
being imported. After copying run.py into the folder
it would launch from either the command prompt or IDLE
with the firewall turned on.

IDLE couldn't find the module and complained there was
a socket error.

hello

···

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

The reason you were getting a socket error in this case, I believe, is
because Idle tried to start up a new Python interpreter to run your
program. Because your program died due to an ImportError, then Idle
couldn't connect to it, and you got a 'couldn't connect to socket' error.

I bypass this issue and just keep a command prompt open ready and
waiting to run the scripts I want to use. On occasion, I use the
command shell embedded into my editor, but I prefer just looking at a
console.

- Josiah

···

Kenneth Long <kelong_2000@yahoo.com> wrote:

>
> Idle uses a socket in order to run the shell/module
> in another process.
> See this thread for more information:
>
ActiveState Community - Boosting coder and team productivity with ready-to-use open source languages and tools.
>

Thanks. This is helpful, but was not exactly the
cause of the "problem". I think the IDLE message is
misleading.. I temporally turned off my firewall, but
that did not resolve the issue.

I tried launching my test code from the command
prompt.
This gave me a better dianognistic message.
I needed to have run.py in the same folder. It was not
being imported. After copying run.py into the folder
it would launch from either the command prompt or IDLE
with the firewall turned on.

IDLE couldn't find the module and complained there was
a socket error.