aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test/wx_class_SUITE.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2011-09-28 10:26:42 +0200
committerDan Gudmundsson <[email protected]>2011-09-28 10:26:42 +0200
commit4d910fc9b179cc630912165998d41a4a047148af (patch)
tree14bf4b1f2d07ec960f58d975da83f5dd2f496e2d /lib/wx/test/wx_class_SUITE.erl
parentbab81645605fef5e6c65637cbbd30f9cb30f68a4 (diff)
parent9299708cb88b5ed000cf2278df420a23e249159a (diff)
downloadotp-4d910fc9b179cc630912165998d41a4a047148af.tar.gz
otp-4d910fc9b179cc630912165998d41a4a047148af.tar.bz2
otp-4d910fc9b179cc630912165998d41a4a047148af.zip
Merge branch 'dgud/wx/wx-bugs' into dev
* dgud/wx/wx-bugs: [wx] Re-generate code [wx] Remove optional shadowing clauses [wx] Remove warning [wx] Fix trailing whitespace [wx] Test colors in textctrl [wx] Fix cleanup memory references
Diffstat (limited to 'lib/wx/test/wx_class_SUITE.erl')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 00ef1289ab..b75b0cc74e 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -448,3 +448,25 @@ systemSettings(Config) ->
wxWindow:show(Frame),
wx_test_lib:wx_destroy(Frame,Config).
+
+
+textCtrl(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+textCtrl(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
+
+ TC = ?mt(wxTextCtrl, wxTextCtrl:new(Frame, ?wxID_ANY, [{style, ?wxTE_MULTILINE bor ?wxTE_RICH2}])),
+ wxTextCtrl:appendText(TC, "This line is in default color\n"),
+ Attr = ?mt(wxTextAttr, wxTextAttr:new(?wxRED)),
+ wxTextCtrl:setDefaultStyle(TC, Attr),
+ wxTextCtrl:appendText(TC, "This line is in ?wxRED color\n"),
+ wxTextAttr:setTextColour(Attr, ?wxBLACK),
+ wxTextCtrl:setDefaultStyle(TC, Attr),
+ wxTextCtrl:appendText(TC, "This line is in ?wxBLACK color\n"),
+ Default = wxSystemSettings:getColour(?wxSYS_COLOUR_WINDOWTEXT),
+ wxTextAttr:setTextColour(Attr, Default),
+ wxTextCtrl:setDefaultStyle(TC, Attr),
+ wxTextCtrl:appendText(TC, "This line is in default color\n"),
+ wxTextAttr:destroy(Attr),
+ wxWindow:show(Frame),
+ wx_test_lib:wx_destroy(Frame,Config).