diff options
author | Dan Gudmundsson <[email protected]> | 2012-11-08 08:00:20 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-01-09 11:41:41 +0100 |
commit | 05d2434a2ccfe94ea7c7db50189ff440b1517fbe (patch) | |
tree | 929479fe29c6d70039c27a4d7ade204e79a73435 /lib/wx/examples/demo/ex_textCtrl.erl | |
parent | 4d30bb386125882d8baba975f1f7d1ef9a93cc67 (diff) | |
download | otp-05d2434a2ccfe94ea7c7db50189ff440b1517fbe.tar.gz otp-05d2434a2ccfe94ea7c7db50189ff440b1517fbe.tar.bz2 otp-05d2434a2ccfe94ea7c7db50189ff440b1517fbe.zip |
wx: Update examples so they work with both wxWidgets 2.8 and 2.9
Diffstat (limited to 'lib/wx/examples/demo/ex_textCtrl.erl')
-rw-r--r-- | lib/wx/examples/demo/ex_textCtrl.erl | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/wx/examples/demo/ex_textCtrl.erl b/lib/wx/examples/demo/ex_textCtrl.erl index d82884f30b..3eadb2bd8f 100644 --- a/lib/wx/examples/demo/ex_textCtrl.erl +++ b/lib/wx/examples/demo/ex_textCtrl.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% Copyright Ericsson AB 2009-2012. All Rights Reserved. %% %% The contents of this file are subject to the Erlang Public License, %% Version 1.1, (the "License"); you may not use this file except in @@ -51,27 +51,23 @@ do_init(Config) -> Sizer3 = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, "wxTextCtrl multiline"}]), - TextCtrl = wxTextCtrl:new(Panel, 1, [{value, "This is a single line wxTextCtrl"}, + TextCtrl = wxTextCtrl:new(Panel, 1, [{value, "This is a single line wxTextCtrl"}, {style, ?wxDEFAULT}]), TextCtrl2 = wxTextCtrl:new(Panel, 2, [{value, "password"}, - {style, ?wxDEFAULT bor - ?wxTE_PASSWORD}]), - TextCtrl3 = wxTextCtrl:new(Panel, 3, [{value, "This is a\n" - "multiline\n" - "wxTextCtrl"}, - {style, ?wxDEFAULT bor - ?wxTE_MULTILINE}]), + {style, ?wxDEFAULT bor ?wxTE_PASSWORD}]), + TextCtrl3 = wxTextCtrl:new(Panel, 3, [{value, "This is a\nmultiline\nwxTextCtrl"}, + {style, ?wxDEFAULT bor ?wxTE_MULTILINE}]), %% Add to sizers - wxSizer:add(Sizer, TextCtrl, [{flag, ?wxEXPAND}]), + wxSizer:add(Sizer, TextCtrl, [{flag, ?wxEXPAND}]), wxSizer:add(Sizer2, TextCtrl2, []), - wxSizer:add(Sizer3, TextCtrl3, [{flag, ?wxEXPAND}]), + wxSizer:add(Sizer3, TextCtrl3, [{flag, ?wxEXPAND}, {proportion, 1}]), wxSizer:add(MainSizer, Sizer, [{flag, ?wxEXPAND}]), wxSizer:addSpacer(MainSizer, 10), wxSizer:add(MainSizer, Sizer2, [{flag, ?wxEXPAND}]), wxSizer:addSpacer(MainSizer, 10), - wxSizer:add(MainSizer, Sizer3, [{flag, ?wxEXPAND}]), + wxSizer:add(MainSizer, Sizer3, [{flag, ?wxEXPAND}, {proportion, 1}]), wxPanel:setSizer(Panel, MainSizer), {Panel, #state{parent=Panel, config=Config}}. |