[erlang-questions] wxStaticText resizing

eigenfunction emeka_1978@REDACTED
Wed Mar 7 17:03:01 CET 2012


I have a static text centered in a panel. When i resize the panel, i
would like the text to resize as well. This is my code:

    wxFrame:connect(Parent, close_window),
    Panel = wxPanel:new(Parent, []),

    %% Setup sizers
    TextSizer = wxBoxSizer:new(?wxVERTICAL),
    ClockText = wxStaticText:new(Panel,1,"00 : 00 : 00",[{style,?
wxALIGN_CENTER}]),

    %% Add to sizers
    wxSizer:add(TextSizer,ClockText,[{flag,?wxEXPAND},{proportion,
1}]),

    wxPanel:setSizer(Panel,TextSizer),
    wxFrame:show(Parent)




More information about the erlang-questions mailing list