paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-users] SetSizeByText


From: H. C.
Subject: [paragui-users] SetSizeByText
Date: Wed, 19 Mar 2003 15:27:33 +0100

Hi,

for release 1.04, it'd be great, if PG_Widget's SetSizeByText(...) was
fixed:

void PG_Widget::SetSizeByText(int Width, int Height, const char *Text) {
    Uint16 w,h;
    int baseLineY;

    if (Text == NULL) {
        Text = my_text.c_str();
    }

    if (!PG_FontEngine::GetTextSize(Text, my_internaldata->font, &w, &h,
&baseLineY)) {
        return;
    }

    //SizeWidget(w + Width, h + Height);
    my_width = w + Width;
    my_height = h + Height + baseLineY;
}





reply via email to

[Prev in Thread] Current Thread [Next in Thread]