Poised Solutions

GUI Development

poised solutions
graphical interface design
Library Poised Solutions

GUI Development

GUI Development


GUI Example Code

#!/usr/bin/python
#-----------------------------------------------------------
#            _
#  __ _ _  _(_)  _ __ _  _
# / _` | || | |_| '_ \ || |
# \__, |\_,_|_(_) .__/\_, |
# |___/         |_|   |__/
#
#-----------------------------------------------------------
# File      : gui.py
# Author    : Richard Lewis
# Project   : /mnt/webbeastie/proj/poisedsolutions/lib/code/
# Syntax    : python
# Date      : Tue 04 Aug 2009
# Copyright : Richard Lewis 2009
#-----------------------------------------------------------
# gui.py - graphical user interface example code
#-----------------------------------------------------------

import wx
#-----------------------------------------------------------

class GUI_Example( wx.Frame ):

    def __init__( self ):
        """Initialise GUI Example"""

        # initialise frame
        wx.Frame.__init__(
            self,
            None,
            -1,
            "GUI Example",
            size = ( 400, 250 )
        )

        # create panel
        panel = wx.Panel( self, 1 )

        panel.Bind( wx.EVT_MOTION, self.OnMove )

        # add some text
        wx.StaticText(
            panel,
            -1,
            "Position:",
            pos = ( 16, 16 )
        )

        # add a text control
        self.position_control = wx.TextCtrl(
            panel,
            -1,
            "",
            pos = ( 80, 14 )
        )
    #-------------------------------------------------------

    def OnMove( self, event ):
        """On Mouse Cursor Move in Window"""

        pos = event.GetPosition()

        self.position_control.SetValue(
            "%s, %s" % ( pos.x, pos.y )
        )
#-----------------------------------------------------------

def main():
    """GUI Example Code"""

    example_application = wx.PySimpleApp()
    example_frame       = GUI_Example()

    example_frame.Show( True )

    example_application.MainLoop()
#-----------------------------------------------------------

if __name__ == "__main__":
    main()
#-----------------------------------------------------------

GUI Developer Services Poised Solutions

DevelopmentPython Developer
DevelopmentPython Developer
C DeveloperApplication DevelopmentC++ Developer
C DeveloperApplication DevelopmentC++ Developer
Web DesignWeb DevelopmentPerl DeveloperGraphic Design
Web DesignWeb DevelopmentPerl DeveloperGraphic Design

GUI Development Resources

GUI Development Resources
GUI Books
















Poised Solutions GUI Development services. If you have a GUI development project then Poised Solutions has the development skills to make that project into a reality. Get in contact with Poised Solutions to discuss your IT Project today.

Poised Solutions Web Design and Web Development by Poised Solutions