How to add JPEG to a Panel

Hi, I am using the code below to add a simple JPEG onto a panel: This does not work so far, could someone indicate to me what I am doing wrong?

# Add a panel to the frame
        panel= wxPanel(panelA, 100,wxPoint(90,30), wxSize(120,70),
                                 wxSIMPLE_BORDER)
        panel.SetBackgroundColour(wxColour(red=240, green=180, blue=252))

        image = wxImage("C:\Documents and Settings\Ahtesham\My Documents\FINAL year project\images.jpg",
                wxBITMAP_TYPE_JPEG).ConvertToBitmap()
        imageView = wxStaticBitmap(panel,-1, image, wxDefaultPosition, wxDefaultSize)

Kind regards for help, in advance.

A.T.

···

_________________________________________________________________
Express yourself with cool emoticons - download MSN Messenger today! http://www.msn.co.uk/messenger

Hi, I am using the code below to add a simple JPEG onto a panel: This does not work so far, could someone indicate to me what I am doing wrong?

# Add a panel to the frame
        panel= wxPanel(panelA, 100,wxPoint(90,30), wxSize(120,70),
                                 wxSIMPLE_BORDER)
        panel.SetBackgroundColour(wxColour(red=240, green=180, blue=252))

        image = wxImage("C:\Documents and Settings\Ahtesham\My Documents\FINAL year project\images.jpg",
                wxBITMAP_TYPE_JPEG).ConvertToBitmap()

HERE IS YOUR PROBLEM:
the \ character is the escape character so... you should escape it too:D

like this:
          image = wxImage("C:\\Documents and Settings\\Ahtesham\\My Documents\\FINAL year project\\images.jpg",wxBITMAP_TYPE_JPEG).ConvertToBitmap()

it should do the trick, I personaly tested the rest of the code and it works just fine.

···

On Tue, 02 Mar 2004 14:14:23 +0000, A. T. <inaleagueofmyown@hotmail.com> wrote:

        imageView = wxStaticBitmap(panel,-1, image, wxDefaultPosition, wxDefaultSize)

Kind regards for help, in advance.

A.T.

--
Peter Damoc
Hacker Wannabe
Now: XP SP1, Python 2.3.3, wxPython 2.4.2.4 (2.5.1.0p7u via set PYHONPATH)