Error setting property / binding alignment on buttons

I’m trying to bind Horizontal Alignment on a button to a template parameter, it’s an int… I’ve tried 0-5 and get

Error setting property to '1' for binding on
at com.inductiveautomation.factorypmi.application.binding.AbstractPropertyAdapter.updateTarget(

Caused by: java.lang.IllegalArgumentException: horizontalAlignment
	at javax.swing.AbstractButton.checkHorizontalKey(Unknown Source)
	at javax.swing.AbstractButton.setHorizontalAlignment(Unknown Source)

What’s the trick?

I guess I didn’t actually try 0-5… or had something goofed up when I did it. Even so, it’s kind of tricky.

To make this work, you have to use values of:

0 = Center
2 = Left
4 = Right
11 = Trailing

found here: under ‘SwingConstants’

1 Like