Menu Control text alignment

Hi,

Is there a way to configure the text alignment of the labels inside the menu control?

image

I believe currently it is left-aligned.

Regards,

Renzi

Hi Renzi,

Although there is no direct text alignment property on the menu control, you can implement the exact result by using the padding property.

For example, if you want right alignment, go to menu item, layout, type a pixel number in padding. Expand it, keep left padding to a bigger number and reduce padding for top, right, bottom. This way the text is aligned to the right.
image

Regards,
Jay

1 Like

I feel like this should be a feature request, because I would find it very useful to have centered menu items. This is especially needed on the horizontal layout because the left aligned looks strange.
In the mean time, I appreciate the workaround, thanks.

1 Like

I second this as a feature request! It is challenging and time consuming to determine exactly how many pixels of padding a given label will need to be truly centered. Furthermore, changing font size, weight, or case can change the padding required. As each Menu Item requires a different amount of padding depending on the word(s) displayed, so it becomes very time consuming just to make a tiny font adjustment that doesn’t throw off the entire menu.

We can definitely put in a feature request for this. In the meantime, there is an alternative you could use using the Styles/Themes feature.
https://www.dundas.com/support/learning/documentation/create-view-content/styles-and-themes

You can set the padding for each menu item as you’d like it (for depth purposes), then once finished, you would create a new style for the menu control. Then you can apply the style and it will apply the padding for each item to the depths you’d like.