@@ -499,7 +499,7 @@ namespace Terminal.Gui {
return new DimAbsolute (n);
}
- class DimCombine : Dim {
+ public class DimCombine : Dim {
Dim left, right;
bool add;
public DimCombine (bool add, Dim left, Dim right)
@@ -145,9 +145,7 @@ namespace Terminal.Gui {
base.Text = ustring.Make (_leftBracket) + " " + text + " " + ustring.Make (_rightBracket);
int w = base.Text.RuneCount - (base.Text.Contains (HotKeySpecifier) ? 1 : 0);
- try {
- Width = w;
- } catch (Exception) {
+ if (Width is Dim.DimCombine) {
// It's a Dim.DimCombine and so can't be assigned. Let it have it's own anchor.
w = Width.Anchor (w);