It is not possible with the button. But there some "workaround":
Place button no. 1. Over this button, place Label with MultiLine=Yes and your caption. Over this place button no. 2 with "BackTransparent=Yes" and "Border=No" (both buttons without caption = space as caption). Set the OnPush on the button no. 2. The first button is creating only the shape of the button, label is the caption and second button is doing the work... :-)
The visual behavior will not be exactly same as common button but...
1) You need to have correct Z order of the objects (allign the object through the Send to back function in menu)
2) The C/AL code or Properties must be set on the second button (the top-most)
Comments
Place button no. 1. Over this button, place Label with MultiLine=Yes and your caption. Over this place button no. 2 with "BackTransparent=Yes" and "Border=No" (both buttons without caption = space as caption). Set the OnPush on the button no. 2. The first button is creating only the shape of the button, label is the caption and second button is doing the work... :-)
The visual behavior will not be exactly same as common button but...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
the label When I click the button nothing happen
2) The C/AL code or Properties must be set on the second button (the top-most)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.