Make button sizes consistent when text label is blank or shorter?

I am displaying buttons in a grid view and using a dynamic date as the button text. The button sizes are (understandably) different depending on whether there is a date vs no date. I have experimented a little with filler text (e.g. dashes) if there is no date but they are still shorter than buttons with a date.

Anyone have any suggestions on how to make the button sizes the same? The only idea I can come up with is making the text ‘2100-01-01’ for those without a date and change the text color to the same color as the button to make it invisible (not sure how to change the text color for New-UDButton) .


For text and background color copy the button.ps1 from GitHub and replace the one you have with this one and you should be able to use these new features.

1 Like