Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7716695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:41:51+00:00 2026-06-01T02:41:51+00:00

I have created my GUI using wxGlade and it looks fine in the display.

  • 0

I have created my GUI using wxGlade and it looks fine in the display. I am now trying to run the code it generated before adding it to my finished Python program. I have tryed copying it in to the file structure and running it then copying the code into a new file. I have check the files needed are on the pythonpath and they are all. Everytime I get this same error message. Error message

Traceback (most recent call last):
  File "C:\Users\Steb\workspace\Check\GuiAttempt.py", line 85, in <module>
    frame_4 = FirstScreen(None, -1, "")
  File "C:\Users\Steb\workspace\Check\GuiAttempt.py", line 21, in __init__
    self.Title = wxPanel(self, -1, style=wxDOUBLE_BORDER|wxTAB_TRAVERSAL)
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", line 402, in SetTitle
    return _windows_.TopLevelWindow_SetTitle(*args, **kwargs)
TypeError: String or Unicode type required

code

#!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
# generated by wxGlade 0.6.5 (standalone edition) on Wed Mar 28 19:14:57 2012

from wxPython.wx import *

# begin wxGlade: extracode
# end wxGlade


class FirstScreen(wxFrame):
    def __init__(self, *args, **kwds):
        # begin wxGlade: FirstScreen.__init__
        kwds["style"] = wxDEFAULT_FRAME_STYLE
        wxFrame.__init__(self, *args, **kwds)
        self.Title = wxPanel(self, -1, style=wxDOUBLE_BORDER|wxTAB_TRAVERSAL)
        self.label_1 = wxStaticText(self.Title, -1, "LA Task Refactoriser\n", style=wxALIGN_CENTRE)
        self.tree_ctrl_2 = wxTreeCtrl(self, -1, style=wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER)
        self.sizer_9_staticbox = wxStaticBox(self, -1, "File A")
        self.tree_ctrl_3 = wxTreeCtrl(self, -1, style=wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER)
        self.sizer_10_staticbox = wxStaticBox(self, -1, "File B")
        self.tree_ctrl_4 = wxTreeCtrl(self, -1, style=wxTR_HAS_BUTTONS|wxTR_LINES_AT_ROOT|wxTR_DEFAULT_STYLE|wxSUNKEN_BORDER)
        self.sizer_11_staticbox = wxStaticBox(self, -1, "File C")
        self.button_1 = wxButton(self, -1, "Load Files")
        self.button_2 = wxButton(self, -1, "Quit")

        self.__set_properties()
        self.__do_layout()
        # end wxGlade

    def __set_properties(self):
        # begin wxGlade: FirstScreen.__set_properties
        self.SetTitle("frame_4")
        self.SetSize((387, 417))
        self.SetBackgroundColour(wxColour(255, 255, 255))
        self.label_1.SetMinSize((160, 38))
        self.label_1.SetBackgroundColour(wxColour(255, 255, 255))
        self.label_1.SetFont(wxFont(12, wxROMAN, wxNORMAL, wxBOLD, 0, ""))
        self.label_1.Enable(False)
        self.Title.SetBackgroundColour(wxColour(255, 255, 255))
        self.Title.SetForegroundColour(wxColour(0, 0, 255))
        self.Title.SetFont(wxFont(12, wxSCRIPT, wxNORMAL, wxBOLD, 0, ""))
        self.Title.Enable(False)
        # end wxGlade

    def __do_layout(self):
        # begin wxGlade: FirstScreen.__do_layout
        sizer_6 = wxBoxSizer(wxVERTICAL)
        sizer_7 = wxBoxSizer(wxVERTICAL)
        sizer_12 = wxBoxSizer(wxHORIZONTAL)
        self.sizer_11_staticbox.Lower()
        sizer_11 = wxStaticBoxSizer(self.sizer_11_staticbox, wxHORIZONTAL)
        self.sizer_10_staticbox.Lower()
        sizer_10 = wxStaticBoxSizer(self.sizer_10_staticbox, wxHORIZONTAL)
        self.sizer_9_staticbox.Lower()
        sizer_9 = wxStaticBoxSizer(self.sizer_9_staticbox, wxHORIZONTAL)
        sizer_8 = wxBoxSizer(wxHORIZONTAL)
        sizer_8.Add(self.label_1, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 100)
        self.Title.SetSizer(sizer_8)
        sizer_7.Add(self.Title, 2, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5)
        sizer_9.Add(self.tree_ctrl_2, 1, wxEXPAND, 0)
        sizer_7.Add(sizer_9, 1, wxEXPAND, 0)
        sizer_10.Add(self.tree_ctrl_3, 1, wxEXPAND, 0)
        sizer_7.Add(sizer_10, 1, wxEXPAND, 0)
        sizer_11.Add(self.tree_ctrl_4, 1, wxEXPAND, 0)
        sizer_7.Add(sizer_11, 1, wxEXPAND, 0)
        sizer_12.Add(self.button_1, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 75)
        sizer_12.Add(self.button_2, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 75)
        sizer_7.Add(sizer_12, 1, wxEXPAND, 0)
        sizer_6.Add(sizer_7, 1, wxEXPAND, 0)
        self.SetSizer(sizer_6)
        self.Layout()
        self.SetSize((387, 417))
        # end wxGlade

# end of class FirstScreen
if __name__ == "__main__":
    app = wxPySimpleApp(0)
    wxInitAllImageHandlers()
    frame_4 = FirstScreen(None, -1, "")
    app.SetTopWindow(frame_4)
    frame_4.Show()
    app.MainLoop()

I am using Python 2.7, my IDE is eclipse indigo with PyDev.
Please help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T02:41:52+00:00Added an answer on June 1, 2026 at 2:41 am

    Your problem is with this:

    self.Title = wxPanel(self, -1, style=wxDOUBLE_BORDER|wxTAB_TRAVERSAL)

    You have named a panel Title, but Title is a propery that expects a string or unicode.

    If you rename Title to something else (like MyTitle), your code will work.

    Do a Find > Replace in your favorite editor and change all instances of self.Title to self.MyTitlePanel (for example) save the file and run it again.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a .jar file that I have created using either
I have created one GUI using Swing of Java. I have to now set
I have created a GUI program using python and wxpython. It is now ready
I have created a wizard using the GUI and so my pages are all
I am trying to create a GUI using java swing. From there I have
I have GUI created using netbeans GUI builder. I want to add there an
I have recently started a tutorial to learn how to code GUI using Windows
I have created a Windows GUI program using C and the Windows API, and
I have created a GUI in Java using swings with the help of Netbeans
I have created a JFrame form using netbeans GUI builder and place buttons on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.