ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Button class

Properties of the Button class:

PropertyExplanation

checked

This property returns the state of the button, where by default, it is set to False. When this property is set to True, the button appears as though it is pressed.

enabled

This property returns the availability of the button, where by default, it is set to True. When this property is set to False, the button is disabled and unavailable. This property allows you to write logic to test the state of the desktop application in order to disable or enable the button. For example, you might have a button that requires a data layer to be loaded in ArcMap before execution is possible.

Functions of the Button class:

FunctionExplanation

__init__(self)

This is a Python built-in function referred to as the constructor where some initial variables can be defined. By default, the checked and enabled properties of the button are initially set for you.

onClick(self)

This function is called and executes your business logic when the button is clicked.

Related topics

  • Creating a Python add-in button

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal