Stefano Mtangoo 455 Senior Poster

Can somebody tell me how to do bolding and Italicizing plus underlining
I have just started getting serious after long time "milk drinking", now I want to eat solid food.
Thanks all,
Steve

import wx
ID_EXIT =100
ID_BOLD = 101
ID_ITALIC = 102
ID_UNDERLINE = 103
ID_TEXT = 104
class SimpleEditor(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)
        #Add Menu Bar
        menubar = wx.MenuBar()
        self.SetMenuBar(menubar)
        #file menu is added
        filemenu = wx.Menu()
        menubar.Append(filemenu, '&File')
        filemenu.Append(ID_EXIT, '&Quit', 'Quit the Program')
        
        # define events
        wx.EVT_MENU(self, ID_EXIT, self.OnExit)
        
        #Add panel
        MainPanel = wx.Panel(self, -1)
        
        # define sizers
        MainSizer = wx.BoxSizer(wx.VERTICAL)
        
        #toolbars font
        tb1 = wx.ToolBar(MainPanel, -1)
        tb1.AddLabelTool(wx.ID_BOLD, '', wx.Bitmap('./icon/format-text-bold.png'))
        tb1.AddLabelTool(wx.ID_ITALIC, '', wx.Bitmap('./icon/format-text-italic.png'))
        tb1.AddLabelTool(wx.ID_UNDERLINE, '', wx.Bitmap('./icon/format-text-underline.png'))
        #tb1.SetToolBitmapSize((24,24 ))
        tb1.Realize()
        #add to sizer
        MainSizer.Add(tb1, proportion = 0, flag = wx.EXPAND)
        
        #set up event handlers
        wx.EVT_MENU(self, ID_BOLD, self.OnBold)
        #wx.EVT_MENU(self, ID_ITALIC, self.OnItalic)
        #wx.EVT_MENU(self, ID_UNDERLINE, self.OnUnderline)
        
        # toolbar other ops
        tb2 = wx.ToolBar(MainPanel, -1)
        tb2.AddLabelTool(ID_EXIT, '', wx.Bitmap('./icon/process-stop.png'))
        tb2.Realize()
        MainSizer.Add(tb2, proportion = 0, flag = wx.EXPAND | wx.TOP, border = 0 )
        
        #Add text control
        Tarea = wx.TextCtrl(MainPanel, ID_TEXT, style = wx.TE_MULTILINE)
        #add to main sizer
        MainSizer.Add(Tarea, 1, wx.EXPAND |wx.LEFT |wx.RIGHT |wx.BOTTOM, 2)
        
        
        
        
        
        
        
        #set main sizer
        MainPanel.SetSizer(MainSizer)
        
        self.Center()
        self.Show(True)
        
        #start events exit
    def OnExit(self, event):
        mess = wx.MessageDialog(self, 'Are you sure you want to Quit?', 'Confirm', style = wx.YES |wx.NO |wx.ICON_QUESTION)
        ret = mess.ShowModal()
        if ret == wx.ID_YES:
            self.Destroy()
        else :
            SimpleEditor.event()    
            
        #start events edit toolbar
    def OnBold(self, event):
        selected = GetStringSelection(self)
        selected = selected.SetWeight(self, Bold)
        return selected
        

app = wx.App(False)
SimpleEditor(None, -1,'Text …
Stefano Mtangoo 455 Senior Poster

So, how do I distinguish Pythons from C++s because I saw somewhere that some functions are not available in wxPy

Stefano Mtangoo 455 Senior Poster

Thanks Paul, It helps alot but you have to go through all C++ stuffs. Isn't there sorted methods somewhere only for Python with no C++ stuffs?

Thanks again

Stefano Mtangoo 455 Senior Poster

I want to subclass My App and I hit the wall. If I don't subclass it works!
WHAT IS WRONG HERE????

import wx
ID_NEW = 10
ID_OPEN = 11
ID_CLOSE = 12
ID_SAVE = 13
ID_SAVE_AS = 14
ID_PAGE_SETUP = 15
ID_PRINT_PREVIEW = 16
ID_PRINT = 17
ID_EXIT = 18
ID_UNDO = 19
ID_REDO = 20
ID_SEARCH = 21
ID_SPELL = 22
ID_HELP = 23
class TextEditor(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, size=(350, 600))
        # self/Text editor is now a Window with all attribute of a frame
        # create status bar
        self.CreateStatusBar()
        # set default status bar string
        self.SetStatusText("For help press F1")
        # define sizers
        vbox = wx.BoxSizer(wx.VERTICAL)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
                
        #Add menu
        #define menubar and menu
        menubar = wx.MenuBar()
        # attach menubar to the frame
        self.SetMenuBar(menubar)
        #define menus
        filemenu = wx.Menu()
        # Append items        
        filemenu.Append(ID_NEW, "&New", "New Blank file")
        filemenu.Append(ID_OPEN, "&Open", "Open  file")
        filemenu.Append(ID_CLOSE, "&Close", "Close file")
        #-----------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_SAVE, "&Save", "Save changes")
        filemenu.Append(ID_SAVE_AS, "Save As...", "Save to different location")
        #-----------------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_PAGE_SETUP, "Page set&up", "Set up properties before printing")
        filemenu.Append(ID_PRINT_PREVIEW, "Print pre&view", "Preview before printing")
        filemenu.Append(ID_PRINT, "&Print", "Print file")
        #-------------------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_EXIT, "E&xit", "Close the program")
        
        menubar.Append(filemenu, "&File")
        
        editmenu = wx.Menu()
        menubar.Append(editmenu, "&Edit")
        
        viewmenu = wx.Menu()
        menubar.Append(viewmenu, "&View")
        
        formatmenu = wx.Menu()
        menubar.Append(formatmenu, "F&ormat")
        
        toolsmenu = wx.Menu()
        menubar.Append(toolsmenu, "&Tools")
        
        helpmenu = wx.Menu()
        menubar.Append(helpmenu, "&Help")
        #------------------------------------
        # Define Event handlers
        #also you can bind event using method below
        #self.Bind(wx.EVT_MENU, ID_EXIT, self.OnExit)
        wx.EVT_MENU (self, ID_EXIT, self.OnExit)
        # Add toolbars
        toolbar1 = wx.ToolBar(self, -1)
        toolbar1.SetToolBitmapSize((24,24 )) …
Stefano Mtangoo 455 Senior Poster

Hello all,
I need some help to get all wxpython methods that associate widgates. I mean ALL methods for wx.Button, wx.Frame etc. I will appreciate if I will get something like pdf version but anything or Idea is welcomed

Thanks and regards
Steve

Stefano Mtangoo 455 Senior Poster

Have anyone done this or hae an Idea on how to do it??

Stefano Mtangoo 455 Senior Poster

Im Not sure if I have spelled well the DLL file but It is file that comes with MySQL 4 and Now in MySQL 5.1. It is standalone server version of MySQL to embedd in App. Is there anyne who knows how to connect to it and Execute SQL commands with Python.

Just Newbie to Database digging hungrily,:)
Thanks for Responses!
Steve

Stefano Mtangoo 455 Senior Poster

I was doing exercises and came up with Idea to post something for very begginers. I'm not experienced in pythoning but I post as my contributing to my fellow programmers in Py! Any suggestion correction and Addition is highly appreciated.
Thanks alot
Steve.

NOTE: Don't forget to start new thread for Questions! Thanks for your understanding!

import wx
ID_EXIT = 12
class MainWindow(wx.Frame):
    def __init__ (self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title)
        
        #Add simple menu with quit item only
        #define menubar and menu
        menubar = wx.MenuBar()
        # attach menubar to the frame
        self.SetMenuBar(menubar)
        #define menus
        filemenu = wx.Menu()
        #Append file menu to menubar
        menubar.Append(filemenu, "&File")
        # Append items    
        filemenu.Append(ID_EXIT, "&Exit", "Close Application")        
        #---You can add as many Menu and Its items as you want
        #-----------------------------------------
        # Define Event handlers
        #also you can bind event using any of the methods below; I prefer the latter
        #self.Bind(wx.EVT_MENU, self.OnExit, id = ID_EXIT)
        wx.EVT_MENU (self, ID_EXIT, self.OnExit)
        #Add a panel
        Panel = wx.Panel(self, -1)
        
        #Add status bar
        self.CreateStatusBar()
        # Add text to status bar
        self.SetStatusText("Press F1 for help")
        
        # Add all your widgets here
        #--------------------------------
        #Add text are with mutliline capability
        Text = wx.TextCtrl(Panel, -1, style= wx.TE_MULTILINE)
        #Text.SetValue("Type your text here!")
        # Add three buttons that need to be equal in size
        yes = wx.Button(Panel, -1, "Yes")
        no = wx.Button(Panel, -1, "No")
        cancel = wx.Button(Panel, -1, "Cancel")
        # After adding all widget stuffs, add them to sizers
        #declare sizers
        main = wx.BoxSizer(wx.VERTICAL)
        grid = wx.GridSizer(1, 3, 4, 4) # …
Stefano Mtangoo 455 Senior Poster

Hi all,
Im very New to My SQL and have done alot of googling and simple studies. I have two Questions:
1. Where can I start with Complete no knowledge of MySQL and databases in general (though i know a little)
2. I have tried to play with MySQL for a time now, but I wonder how can mysql be run in application as standalone server. I have read somewhere that you can run it as DLL server if you call it but I have no idea on what it is done. I want to do that In Python Application. I posted in Python forum but people seem to be not interested in topic.

Thanks alot,
Steve

Stefano Mtangoo 455 Senior Poster

http://www.daniweb.com/forums/thread59879.html

Yah That is the problem!
Thanks Ene.

Stefano Mtangoo 455 Senior Poster

I'm Learning python Also. I started with learning general syntax and now I'm trying to make simple wordpad as my fist module. Then I will go for databases ..... etc. Just pick simple project in real word app and play around to be more familiar with python

Stefano Mtangoo 455 Senior Poster

Yes!
Python bundles the interpreter (Pythonxx.dll) with your code and make executable file to run on windows. Just google for G2py. It is one of py2exe gui version . Basically you use py2exe

Hope it helps

Stefano Mtangoo 455 Senior Poster

Just to add on that, I want to put my icons in a folder named icons in the same folder as my script. How do I reference them in code without error "File so and so.png does not exist"

Thanks again

Stefano Mtangoo 455 Senior Poster

Hello all,
Please review these two piece of code and see why the latter doesnt resize as desired. When I add panel I find result becomes very strange. How can I resize widgets in a panel without such problem? Below are the two codes for simple editor

PROBLEMATIC CODE

import wx
ID_NEW = 10
ID_OPEN = 11
ID_CLOSE = 12
ID_SAVE = 13
ID_SAVE_AS = 14
ID_PAGE_SETUP = 15
ID_PRINT_PREVIEW = 16
ID_PRINT = 17
ID_EXIT = 18
ID_UNDO = 19
ID_REDO = 20
ID_SEARCH = 21
ID_SPELL = 22
ID_HELP = 23
class TextEditor(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, size=(350, 600))
        # self/Text editor is now a Window with all attribute of a frame
        # create status bar
        self.CreateStatusBar()
        # set default status bar string
        self.SetStatusText("For help press F1")
        # define sizers
        vbox = wx.BoxSizer(wx.VERTICAL)
        hbox = wx.BoxSizer(wx.HORIZONTAL)
                
        #Add menu
        #define menubar and menu
        menubar = wx.MenuBar()
        # attach menubar to the frame
        self.SetMenuBar(menubar)
        #define menus
        filemenu = wx.Menu()
        # Append items        
        filemenu.Append(ID_NEW, "&New", "New Blank file")
        filemenu.Append(ID_OPEN, "&Open", "Open  file")
        filemenu.Append(ID_CLOSE, "&Close", "Close file")
        #-----------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_SAVE, "&Save", "Save changes")
        filemenu.Append(ID_SAVE_AS, "Save As...", "Save to different location")
        #-----------------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_PAGE_SETUP, "Page set&up", "Set up properties before printing")
        filemenu.Append(ID_PRINT_PREVIEW, "Print pre&view", "Preview before printing")
        filemenu.Append(ID_PRINT, "&Print", "Print file")
        #-------------------------------------------------------
        filemenu.AppendSeparator()
        filemenu.Append(ID_EXIT, "E&xit", "Close the program")
        
        menubar.Append(filemenu, "&File")
        
        editmenu = wx.Menu()
        menubar.Append(editmenu, "&Edit")
        
        viewmenu = wx.Menu()
        menubar.Append(viewmenu, "&View")
        
        formatmenu = wx.Menu()
        menubar.Append(formatmenu, "F&ormat")
        
        toolsmenu = wx.Menu()
        menubar.Append(toolsmenu, "&Tools")
        
        helpmenu = wx.Menu()
        menubar.Append(helpmenu, "&Help") …
Stefano Mtangoo 455 Senior Poster

Thanks all dears,
It is too late and I did factory reset. I have done some photo recovery and some data are gone.

Good lesson by the way though in hard way bu I accept it. Thanks everyone for you help. I should backup everything now before I tamper with my beautiful laptop

God blesss you aaaaaaaaall

Steve

Stefano Mtangoo 455 Senior Poster

I Want to do Fresh installation but how can I do backups for My GAOTD softwares??
Thanks

Stefano Mtangoo 455 Senior Poster

Thanks, but I need to know embeding techniques as applies to MySQL. Can one still show an example?

Thanks Sneekula for your comment

Steve

Stefano Mtangoo 455 Senior Poster

Hello Guys can somebody provide examples and explanations on how to embed MySQL server using SQLmylibd.dll (If I remember well).
Appreciation to all answers,
Steve

Stefano Mtangoo 455 Senior Poster

Hello guys,
I have my laptop that came with Vista Home premium. Today I tried to install Solaris 10 but it failed. I tried to boot my Vista it failed also. Then I used Gparted to remove Solaris partition by deleting it; That made my laptop unbootable with error "No Active partition".

Since I was fool enough NOT to backup my system, I don't know what to do! I have googled alot but All I get is commercial softwares and Cannot buy (No credit card). How can I do it? I want to recover my Programs I got from GAOTD. Help please!!

Steve

Stefano Mtangoo 455 Senior Poster

Hi All,
I need to center Suckerfish dropdown menu in my drupal site. How can I do that? I use roople theme Lite Jazz and Drupal 6.
Thanks alot
Steve:)

Stefano Mtangoo 455 Senior Poster

Thanks I will check
S.

Stefano Mtangoo 455 Senior Poster

Mh That helped a little. I need complete guide to debugging. I'm new to the art, and need newbie instructions. BTW thanks for help
S.

Stefano Mtangoo 455 Senior Poster

which GUI do you use? Gpy2exe should wake fine. Do you use setup.py?

Need clarification to help

Stefano Mtangoo 455 Senior Poster

I have googled and found the video module but again hit a wall somewhere at enabling the module:


FlashVideo Amazon S3 Plugin 6.x-1.4-beta Adds Amazon S3 support
Depends on: FlashVideo (enabled), Upload (enabled)

FlashVideo CCK 6.x-1.4-beta Provides a plugin to allow CCK parameters to overide FlashVideo functionality.
Depends on: Content (missing),

FlashVideo (enabled), Upload (enabled)
FlashVideo Views 6.x-1.4-beta Provides a plugin to allow Views functionality to the FlashVideo Module
Depends on: Views (missing), FlashVideo (enabled), Upload (enabled)

where do I get this modules. Im searching now at www.drupal.org

Stefano Mtangoo 455 Senior Poster

Can Anyone tell me how to use debugger.
I have only once used Wingware Wing IDE. I just clicked debugger and it will highlight error! I want to be advanced with debuggers and debugging in python. can anyone tell me how thing go up?

Thanks in Advance,
S.

Stefano Mtangoo 455 Senior Poster

I have made a progress but I have stacked on how to add flash video. I use Litejazz theme. I want to put flsh video but I dont know which argument to pass to scr="***" in Flash code (ie to locate flash file on server), can anyone tell me how to do it? I have tried but i end with heading/ label/ title but no flash video!!

Thanks alot
Steve

Stefano Mtangoo 455 Senior Poster

It is good to know inner coding but why not using py2exe Gui versions?
f that is what you want Then read this

http://www.daniweb.com/forums/thread141828.html

Stefano Mtangoo 455 Senior Poster

Which version of the Netbeans IDE did you download for Python coding?

I started with NB 6.1 with nbpython plugin but Now I use NB 6.5 Beta with nbpython milestone 6. It have been blessing to work All my projects Python, PHP and C/C++ on same IDE
Netbeans: www.netbeans.org
Nbpython: www.nbpython.dev.java.net

Another Question: What if I write python Code and want to make it run as java code with Jython?

Stefano Mtangoo 455 Senior Poster

I'm really enjoying python in my Netbeans IDE. I would like to know extensive difference between these version of Python: Cpython, Jython, Iron python, pypy .....etc (You can add it). What is the main difference? Why all these versions? What are end products of all these versions? (.exe, .jar, etc). Why should I use one of them? Can I have all of them? Why?

You can add as many question as you can as well as answer as much as you can.

Steve

Stefano Mtangoo 455 Senior Poster

Yes, The tutorial is Good but at the end only one "Complex" example! Can anyone provide simple example with wx python as Gui to do very simple manipulation? May be one table with three rows and columns, then manipulate those rows and columns as example. I think that will be good example for database Newbies

Steve

Stefano Mtangoo 455 Senior Poster

Thanks I'm going to check and soon will be back! Feel free to add anything else
appreciations!
Steve

Stefano Mtangoo 455 Senior Poster

Hello there!
I greet you all,
I have a question on Database. First of all I'm completely new In Database realm and know a little . Just definition and little about it. Can anyone tell me how to do database programming (Specifically MySQL) in both server and embeded sever mode, interfacing with wxPython GUI toolkit?

Zetcode have got some tutorial on SQlite, but I need some more best tutrial (Especially but not limited to) MySQL Database. Also simple code to deal with simple database

Any help beyond my explanations is appreciated! Good Day

Steve

Stefano Mtangoo 455 Senior Poster

Hello there!
I greet you all,
I have a question on Database. First of all I'm completely new In Database realm and know a little . Just definition and little about it. Can anyone tell me how to do database programming (Specifically MySQL) in both server and embeded sever mode, interfacing with wxPython GUI toolkit?

Zetcode have got some tutorial on SQlite, but I need some more best tutrial (Especially but not limited to) MySQL Database. Also simple code to deal with simple database

Any help beyond my explanations is appreciated! Good Day

Steve

Stefano Mtangoo 455 Senior Poster

Hello there!
I greet you all,
I have a question on Database. First of all I'm completely new In Database realm and know a little . Just definition and little about it. Can anyone tell me how to do database programming (Specifically MySQL) in both server and embeded sever mode, interfacing with wxPython GUI toolkit?

Zetcode have got some tutorial on SQlite, but I need some more best tutrial (Especially but not limited to) MySQL Database. Also simple code to deal with simple database

Any help beyond my explanations is appreciated! Good Day

Steve

Stefano Mtangoo 455 Senior Poster

Try this best free book
www.diveintopython.org
also there is newbie tutorials at zetcode
www.zetcode.com

For IDE to use with
Netbeans IDE (www.netbeans.org) with Nbpython plugin (www.nbpython.dev.java.net)
or you can use eclipse(I think it is www.eclipse.org) with pydev plugin (search it at www.sourceforge.net)

or you can use Wing ide 101 VERSION
here at www.wingware.com

Simple editors/IDEs includes
IDLE --- comes with python
Pspad ----Just google it!

Ready to go! Enjoy!

Stefano Mtangoo 455 Senior Poster

Hello Guys,
Here we have monitoring system using telnen address. I hate dos black window and I want to wrapp that address to Nice Gui. I have no clue how to do rather than hear something about piping! I want to catch keyboard commands (like press F9 to display all) to Gui buttons and output screen to a formatted text control. I also want to group alarms due to severity (Green, amber, red) and much more. Can one point to me how to do it??

Thanks guys
Steve

Stefano Mtangoo 455 Senior Poster

Thanks alot digital-ether,
I will go and do it, but anyone who wants to add, it is welcomed!

S.

Stefano Mtangoo 455 Senior Poster

IF you work on vista, right click the installer (py2exe) and run as admin. That will install fine. You can use Gui tools for py2exe. Just google for Gui2exe, Gpy2exe (This worked for me), pyinstaller and pybuilder.

Tell me how you progress
Steve

Stefano Mtangoo 455 Senior Poster

Try Gpy2exe. It work for me
here it is
http://www.gpy2exe.tk/
Tell me how you see it!
Steve

lllllIllIlllI commented: Awesome software +1
Stefano Mtangoo 455 Senior Poster

Hello guys,
I have Installed drupal for some time, though still newbie. I ca configure blocks menu etc. One thing I have failed; to hack the theme to make site look the way I want to look. I have a site already in my local server (WAMP), but I need CMS due to many stuffs that I plan to put in the site

So Question is : What file do I edit? Does it need me to be PHP Expert to do it? Honestly I'm very young (Infact a babe) in PHP language. I really need your help to get It right!

Another Question: What is technical difference between DRUPAL and MOODLE? I know they differ in application but don't know about programmatcal difference!

Steve

Stefano Mtangoo 455 Senior Poster

Hello dears,
I need your help. I want to build executable file from py script using py2exe gui aka Gui2exe. but it keep crashing. "Error: execution of command python -u......system cannot find the file specified

Have one compiled successful with Gui2exe? Which options do you use?
Thanks alot,
Steve

Stefano Mtangoo 455 Senior Poster

bind the item like this, with a keyword argument

self.Bind(wx.EVT_MENU, self.OnPrint, id=ID_PRINT)

Note, with the traceback, you were able to find out that the error happened during this call !

You have got it Gribouillis!
I replaced ID_PRINT with id=ID_PRINT
Thank you ALL for Good discussion
Apreciation from Jr. MD
God bless you!:D

Stefano Mtangoo 455 Senior Poster

I have tried to run code as re-written by jice but still get error --- "int object have no attribute GetId"

Still have no clue of what is wrong

Stefano Mtangoo 455 Senior Poster

Can you rewite the code and put here so that I will understand what you are saying! By the way thanks for response
Steve

Stefano Mtangoo 455 Senior Poster

Thanks BearofNH for your help. Do you mean the sama indentation with

self.Show(True)

? If that is what you say, then that is how the code is. Still don't know what is wrong my dear!!

Steve

Stefano Mtangoo 455 Senior Poster

I Nowuse Netbeans and have improved much. Thanks alot

Stefano Mtangoo 455 Senior Poster

I Now don't use SPE anymore. I have switched to Eclipse and Pydev But Now I'm with NETBEANS and NbPython. It is Good as I learn with it C++, PHP and Python in the same IDE
Thanks All,
Steve

Stefano Mtangoo 455 Senior Poster

I Used WAMP and Netbeans IDE. I'm acquainted with XHTML/CSS and have no clue where to start with PHP. Does it look like Python or C++ ? I see alot of $ and Very confused Hlp pleas??????????????
Steve

Stefano Mtangoo 455 Senior Poster

I decided to use another thing, Thanks All

Stefano Mtangoo 455 Senior Poster

Hello Guys, I have problem with Bindinging Event to menu. Every time I run this on IDLE (F5). I get always Attribute error that self have no attribute OnPrint. What's wrong with the Code????

# SMD Inc since 2003.py

import wx
ID_ABOUT = 100
ID_PRINT = 101
ID_EXIT  =102

class MainWindow(wx.Frame):
    def __init__(self, parent, id, title):
        wx.Frame.__init__(self, parent, id, title, size=(500, 350))
        self.CreateStatusBar()
        self.SetStatusText("Displays program Information")
        
        menubar = wx.MenuBar()
        # File menu
        filemenu = wx.Menu()
        filemenu.Append(ID_PRINT, "&Print", "Print the current Window")
        filemenu.Append(ID_EXIT, "E&xit", "Exit the program")
        menubar.Append(filemenu, "&File")
        # Help Menu
        helpmenu = wx.Menu()
        helpmenu.Append(ID_ABOUT, "&File", "About this program")
        menubar.Append(helpmenu, "He&lp")

        # Attach and set Menubar on Frame
        self.SetMenuBar(menubar)

        # Binding Events
        self.Bind(wx.EVT_MENU, self.OnPrint, ID_PRINT)      
        
       

        self.Centre()
        self.Show(True)

        # Setting methods
        def OnPrint(self, event):
            self.close()
            dia = wx.MessageDialog(self, "Thank you!", "About the program", wx.OK)
            dia.ShowModal()
            dia.Destroy()      
        
app = wx.App()
MainWindow(None, -1, "Elijah's SMD Inc. since 2003")
app.MainLoop()

Steve