From: Kevin A. <al...@se...> - 2004-04-22 20:50:51
|
On Apr 22, 2004, at 1:32 PM, ralph heimburger wrote: > I am implementing a pass-through security scheme in where I get the > login name and then inspect a users table. > > Depending on their access capabilities, I would like to Disable the > Delete and Update buttons on the form (Inquiry Mode). > > I tried: > self.components.DeleteButton.disable() > > Obviously this is not the correct method. self.components.DeleteButton.enabled = False PythonCard uses component attributes for this type of common operation. These are listed in the property editor when you're using the resourceEditor and you can play with them interactively at runtime in the shell or runtime property editor as well. Here is the output from the widgets.py Create Component Docs... command. http://pythoncard.sourceforge.net/framework/components/Button.html Since PythonCard components are wxPython subclasses it is legal to use the Disable() method, but using attributes is preferred; note the CamelCase naming style of wxPython methods. The docs will be updated to show True and False for boolean attributes instead of 1 and 0: default, enabled, and visible. ka |