({{, (RefLink[ButtonData, paclet:ref/ButtonData])
is an option for the low-level function (RefLink[ButtonBox, paclet:ref/ButtonBox]) that specifies the second argument to give to the (RefLink[ButtonFunction, paclet:ref/ButtonFunction]) for the button when the button is active and is clicked. }})

OpenersNotesSection(Spacer1)Details

The default is (RefLink[ButtonData, paclet:ref/ButtonData])->(RefLink[Automatic, paclet:ref/Automatic]).

(RefLink[ButtonData, paclet:ref/ButtonData]) provides a convenient way to associate additional data with a button that does not affect the display of the button.

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a button that prints out its (RefLink[ButtonData, paclet:ref/ButtonData]) value:

CellPrint[Cell[BoxData[ButtonBox["Click to print data",Evaluator->Automatic,ButtonFunction->(Print[#]&),ButtonData->123,Appearance->"DialogBox"]],"Text"]]

Click to print data

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Button, paclet:ref/Button])  ▪  (RefLink[ButtonSource, paclet:ref/ButtonSource])  ▪  (RefLink[BaseStyle, paclet:ref/BaseStyle])}})}})