Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Controlling State with Python Add-In

$
0
0
I am trying to control the state of one button using another and nothing I have tried so far has worked. This is what should work. Any suggestions?

Code:

import arcpy
import pythonaddins

class ButtonClass1(object):
   
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        ButtonClass2.enabled = False
        pass

class ButtonClass2(object):
   
    def __init__(self):
        self.enabled = True
        self.checked = False
    def onClick(self):
        pass

What is the point of having these properties if you cannot set and reset them?
http://resources.arcgis.com/en/help/...000001s000000/

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images