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

  • Home
  • SEARCH
  • 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 92785
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:14:30+00:00 2026-05-10T23:14:30+00:00

If I have a notebook with three spreadsheet widgets, what is the best way

  • 0

If I have a notebook with three spreadsheet widgets, what is the best way to have changes to the spreadsheet update a dictionary (or maybe an sqlite file?). Do all wx grid objects come with a built in dictionary related to the SetNumberRows and SetNumberCols? Basically I am looking for guidance on how to work with the user-input data from a spreadsheet widget, as in this example adapted from the tutorial on python.org:

class ExSheet(wx.lib.sheet.CSheet):     def __init__(self, parent):         sheet.CSheet.__init__(self, parent)         self.SetLabelBackgroundColour('#CCFF66')         self.SetNumberRows(50)         self.SetNumberCols(50)  class Notebook(wx.Frame):     def __init__(self, parent, id, title):         wx.Frame.__init__(self, parent, id, title)         nb = wx.Notebook(self, -1, style=wx.NB_BOTTOM)         self.sheet1 = ExSheet(nb)         self.sheet2 = ExSheet(nb)         self.sheet3 = ExSheet(nb)         nb.AddPage(self.sheet1, 'Sheet1')         nb.AddPage(self.sheet2, 'Sheet2')         nb.AddPage(self.sheet3, 'Sheet3')         self.sheet1.SetFocus()         self.StatusBar() 
  • 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. 2026-05-10T23:14:31+00:00Added an answer on May 10, 2026 at 11:14 pm

    Use a wxGrid with a wxGridTableBase instead

    Here is a simple example:

    import wx, wx.grid  class GridData(wx.grid.PyGridTableBase):     _cols = 'a b c'.split()     _data = [         '1 2 3'.split(),         '4 5 6'.split(),         '7 8 9'.split()     ]      def GetColLabelValue(self, col):         return self._cols[col]      def GetNumberRows(self):         return len(self._data)      def GetNumberCols(self):         return len(self._cols)      def GetValue(self, row, col):         return self._data[row][col]      def SetValue(self, row, col, val):         self._data[row][col] = val  class Test(wx.Frame):     def __init__(self):         wx.Frame.__init__(self, None)         self.data = GridData()         grid = wx.grid.Grid(self)         grid.SetTable(self.data)         self.Bind(wx.EVT_CLOSE, self.OnClose)         self.Show()      def OnClose(self, event):         print self.data._data         event.Skip()  app = wx.PySimpleApp() app.TopWindow = Test() app.MainLoop() 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer It's probably because you have auto_increment set and the query… May 11, 2026 at 11:06 am
  • added an answer The problem seemed to be that the MenuItem's mouse event… May 11, 2026 at 11:06 am
  • added an answer The find() method tokenizes the query, and with the default… May 11, 2026 at 11:06 am

Related Questions

If I have a notebook with three spreadsheet widgets, what is the best way
If I have a trigger before the update on a table, how can I
If I have a variable in C# that needs to be checked to determine
If I have a <input id=uploadFile type=file /> tag, and a submit button, how
If I have a query like: Select EmployeeId From Employee Where EmployeeTypeId IN (1,2,3)
If I have a collection of database tables (in an Access file, for example)
If I have a Resource bundle property file: A.properties: thekey={0} This is a test
If I have a table in MySQL which represents a base class, and I
If I have a std::vector or std::map variable, and I want to see the
If I have a query like, DELETE FROM table WHERE datetime_field < '2008-01-01 00:00:00'

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.