Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code for property grid manager code generated with an error #805

Closed
dncarachiola opened this issue Feb 5, 2024 · 2 comments
Closed

Code for property grid manager code generated with an error #805

dncarachiola opened this issue Feb 5, 2024 · 2 comments
Labels

Comments

@dncarachiola
Copy link

I've added a property grid manager to my GUI.
In the import statement for 'propgrid' an "as" is included to "pg"
But in the definition for the propgrid uses "wx.propgrid", and thus is undefined.
Later code uses "pg".

`# -- coding: utf-8 --

###########################################################################

Python code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)

http://www.wxformbuilder.org/

PLEASE DO NOT EDIT THIS FILE!

###########################################################################

import wx
import wx.xrc
import wx.propgrid as pg

import gettext
_ = gettext.gettext

###########################################################################

Class *********************************

###########################################################################

class **************** ( wx.Dialog ):

def __init__( self, parent ):

	* * *

    self.grid_manager = pg.PropertyGridManager(self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, wx.propgrid.PGMAN_DEFAULT_STYLE|wx.propgrid.PG_BOLD_MODIFIED|wx.propgrid.PG_DESCRIPTION|wx.propgrid.PG_NO_INTERNAL_BORDER|wx.propgrid.PG_SPLITTER_AUTO_CENTER|wx.propgrid.PG_TOOLTIPS|wx.TAB_TRAVERSAL)
    self.grid_manager.SetExtraStyle( wx.propgrid.PG_EX_HELP_AS_TOOLTIPS )

    self.page = self.grid_manager.AddPage( _(u"Page"), wx.NullBitmap );
    self.task_data = self.page.Append( pg.PropertyCategory( _(u"Task data (req'd)."), _(u"Task data (req'd).") ) )
    self.duration = self.page.Append( pg.FloatProperty( _(u"Duration"), _(u"Duration") ) )

	* * *

	edit.Add( self.grid_manager, 1, wx.EXPAND, 0 )

`

@sodevel
Copy link
Member

sodevel commented Feb 9, 2024

I know basically nothing about Python so why is this beeing done and how can this be fixed?

@dncarachiola
Copy link
Author

Thank you for addressing this so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants