Gui.cs: Button: Cannot be resized by changing Frame.

Created on 31 May 2020  路  3Comments  路  Source: migueldeicaza/gui.cs

In the LayoutStyle.Absolute, views should be able to be moved and resized by changing the Frame property. With Button adjusting the location works, but not size (nothing happens).

bug priority-low

All 3 comments

That's because it is forced by this method to Height = 1:

int SetWidthHeight (ustring text, bool is_default)
{
    int w = text.Length + 4 + (is_default ? 2 : 0);
    Width = w;
    Height = 1;
    return w;
}

Nope. When LayoutStyle.Absolute is set, SetWidthHeight never gets called when Frame changes.

FWIW, the Buttons UI Catalog scenario now has a repro for this Issue (in #601)

image

Was this page helpful?
0 / 5 - 0 ratings