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

Related Questions

As of now I use 3 Notebook : Functions Where I have all the
We have a higher-end Win7-64 Dell precision workstation notebook with an i7, 8 gigs
I have the occasional need to run SQL Server on my notebook computer. 90%
I have a Java servlet running on my notebook with Windows Vista, I set
I have a notebook with VGA port and HDMI port. Therefore I'm able to
I have modified my notebook's stylesheet to include a StyleData[Todo] that inherits from StyleData[Item]
I have the following class in my model: public class Notebook : TableServiceEntity {
How to refresh a notebook on the fly? I have an application which is
Given example: table->person - table->books(uses->person_id) - table->notebook(uses->person_id) In my Zend classes i define all
I have a situation where say, a Notebook stores Pages . At first, I

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.