Chaning width of a Button

Ok I think I am missing something simple, but I cannot seem to change the width of a

Here is the code segment. Am I missing something here or what do I need to change
in order to get the button to change width.

    TextFrame = new TGHorizontalFrame(this, 500, 100, kFixedWidth);
    fRefreshButton = new TGTextButton(TextFrame, "&Refresh", REFRESH_BUTTON_ID);

    RefreshLayout = new TGLayoutHints(kLHintsTop | kLHintsRight,
                            2, 10, 2, 2);
    TextFrameLayout = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 2, 5, 1);
    TextFrame->AddFrame(fRefreshButton, RefreshLayout);
    fRefreshButton->Resize(150, fRefreshButton->GetDefaultHeight());
    AddFrame(TextFrame, TextFrameLayout);


In your code you should set the width of the button parent frame:


because you have defined this frame with option kFixedWidth, and the added text button has kLHintExpandX layout hint.

Cheers, Ilka