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 7596073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:49:50+00:00 2026-05-30T21:49:50+00:00

Any help is appreciated this has been driving me insane import wx class Frame(wx.Frame):

  • 0

Any help is appreciated this has been driving me insane

import wx

class Frame(wx.Frame):

    def __init__(self):
        wx.Frame.__init__(self, None, -1)

        # dp = DownloadPanel(self)
        # dl = dp.download_list
        dl = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
        dl.InsertColumn(0, "File")
        dl.InsertColumn(1, "Progress")
        dl.InsertColumn(2, "State")
        dl.SetStringItem(0, 0, "FILE")
        dl.SetStringItem(0, 1, "PERCENT")
        dl.SetStringItem(0, 2, "STATE")
        dl.SetStringItem(1, 0, "FILE")
        dl.SetStringItem(1, 1, "PERCENT")
        dl.SetStringItem(1, 2, "STATE")
        dl.SetStringItem(2, 0, "FILE")
        dl.SetStringItem(2, 1, "PERCENT")
        dl.SetStringItem(2, 2, "STATE")
        dl.SetStringItem(3, 0, "FILE")
        dl.SetStringItem(3, 1, "PERCENT")
        dl.SetStringItem(3, 2, "STATE")

        self.Refresh()
        dl.Refresh()
        self.Update()
        dl.Update()
        self.Layout()
        dl.Layout()

if __name__ == "__main__":
    a = wx.App(False)
    f = Frame()
    f.Show()
    a.MainLoop()

Ok when I run this the items aren’t display, what am I doing wrong? I’m adding the items. Ahhhh!

  • 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-05-30T21:49:51+00:00Added an answer on May 30, 2026 at 9:49 pm

    Use InsertStringItem to start a new row:

    import wx
    import sys
    
    class Frame(wx.Frame):
        def __init__(self, parent):
            wx.Frame.__init__(self, parent, size=(380, 230))
    
            dl = wx.ListCtrl(self, -1, style=wx.LC_REPORT)
            dl.InsertColumn(0, 'File')
            dl.InsertColumn(1, 'Progress')
            dl.InsertColumn(2, 'State')
    
            for row in range(3):
                labels = [l+str(row) for l in "FILE PERCENT STATE".split()]
                # sys.maxint inserts at the end of the list
                index = dl.InsertStringItem(sys.maxint, labels[0])
                dl.SetStringItem(index, 1, labels[1])
                dl.SetStringItem(index, 2, labels[2])
    
            self.Show(True)
    
    app = wx.App()
    Frame(None)
    app.MainLoop()
    

    yields

    enter image description here

    I learned this by comparing your code with the sample found here. The examples here may also help you.

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

Sidebar

Related Questions

Any help most appreciated, this is driving me insane. I'm doing exactly what I
Been struggling with this for quite some time so any help is appreciated. Spent
This has been driving me insane for about the last hour. I'm trying to
This is driving me crazy, so any help will be appreciated. I am developing
I'm very new to this, so any help is appreciated. I'll use the Dinners/RSVPs
Any help here would be greatly appreciated. I have this table hospital Nurse |
This has been really driving me crazy. Web links work fine, but a phone
This has been driving me nuts all day. I've seen this problem crop up
This has been driving me absolutely nuts. I have a substitute function like this:
This has been driving me crazy for the better part of the day. I've

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.