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)
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: