Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Here is


sample boo code for using the wx.NET GUI framework

. By Angel Ignacio Colmenares.

It requires wx-cc.dll and wx.NET.dll.

(Please check the indenting on this code if you run or alter it, it was just copied and pasted from Google.)

Code Block
import wx from "wx.NET"
import System
import System.Drawing from System.Drawing

class myFrame(wx.Frame):

        def constructor(title as String, pos as Point, size as Size):

                super(null, title, pos, size)
                #Icon = wx.Icon("mondrian.png")

                fileMenu =  wx.Menu()
                fileMenu.Append(1, "E&xit\tAlt-X", "Quit this program")
                helpMenu =  wx.Menu()
                helpMenu.Append(2 , "&About...\tF1", "Show about dialog")

                EVT_MENU(1, OnQuit )
                EVT_MENU(2, OnAbout)

                menuBar =  wx.MenuBar()
                menuBar.Append(fileMenu, "&File")
                menuBar.Append(helpMenu, "&Help")

                MenuBar = menuBar

                StatusText = "Welcome to wxWidgets!"

        def OnQuit(sender as object,  e as wx.Event)as void :

        def OnAbout(sender as object, e as wx.Event) as  void:
                msg = "This is the About dialog of the minimal sample."
                wx.MessageDialog.ShowModal(self, msg, "About Minimal", Dialog.wxOK | Dialog.wxICON_INFORMATION)

class Minimal(wx.App):
        def OnInit():
                frame= myFrame("Hello boo + wx.NET", Point(50,50), Size(450,340))
                return true

class main():
        def constructor():