I am maintaining some existing Java code so I am not looking to make major changes to the way it is currently done. I removed some items from a dialog, (which is fundamentally an org.eclipse.swt.widgets.Shell) and now the dialog displays much smaller, so small that the title and the menu bar do not display in their entirety. I can set the minimum width to fix this problem, but since the users may have different screen sizes and resolutions, I would prefer not to attempt a one-size-fits-all width.
I set it to the preferred size, using
and it improved the situation (the menu displays completely), but the dialog title is still being elided.
Is there a way of determining the minimum width of a dialog to display the title completely?
Alternatively, is there a way of getting the title as it's displayed (including ellipsis, if any) or of determining if it's being elided?