### Add Button to Form

To add a new Button Control via code, use addNode Method.
Example adding a Button at position 350, 400 in the an anchorpane with ID anchorpaneMain.
`Sub Process_Globals
...
Private anchorpaneMain As AnchorPane
...
End Sub`
' Add a new button with eventname BN. The event action for the Button is defined seperate.
`Sub addButton
Dim buttonNew As Button
buttonNew.Initialize("BN")
buttonNew.Text = "Button New"
buttonNew.Style = "-fx-font-size: 2.0em; -fx-Font-family: 'Segoe UI Semibold'; -fx-text-fill: Black; -fx-opacity: 1;"
anchorpaneMain.addNode(buttonNew, 350, 400, -1, -1)
Log("New Button added")
End Sub`
' The new button event when clicking
`Sub BN_Action
Log("Button new clicked...")
End Sub`

Changed: , Category: Nodes, File: T6C225M1660.htm, ID: 1660