diff options
author | Dan Gudmundsson <[email protected]> | 2013-08-29 10:50:00 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2013-08-29 10:50:00 +0200 |
commit | 18d4e3e1a8aa59afbf360c41a540062194ff3dd1 (patch) | |
tree | d7fc6345dbdf93b972fa00eec01cc2273bdb207b /lib/wx/test/wx_class_SUITE.erl | |
parent | 3bbfd3bd72601f7881115284ebf41bc25711a6d8 (diff) | |
parent | 6a6bc2560c60ea790780dcfbc91336a734eff1be (diff) | |
download | otp-18d4e3e1a8aa59afbf360c41a540062194ff3dd1.tar.gz otp-18d4e3e1a8aa59afbf360c41a540062194ff3dd1.tar.bz2 otp-18d4e3e1a8aa59afbf360c41a540062194ff3dd1.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/wx/test/wx_class_SUITE.erl')
-rw-r--r-- | lib/wx/test/wx_class_SUITE.erl | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl index 7c3eda0be1..0e151ccc9b 100644 --- a/lib/wx/test/wx_class_SUITE.erl +++ b/lib/wx/test/wx_class_SUITE.erl @@ -50,7 +50,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [calendarCtrl, treeCtrl, notebook, staticBoxSizer, clipboard, helpFrame, htmlWindow, listCtrlSort, listCtrlVirtual, - radioBox, systemSettings, taskBarIcon]. + radioBox, systemSettings, taskBarIcon, toolbar]. groups() -> []. @@ -493,3 +493,20 @@ taskBarIcon(Config) -> wxTaskBarIcon:connect(TBI, taskbar_left_down, [{callback, fun(Ev,_) -> io:format("Left clicked: ~p~n",[Ev]) end}]), wxTaskBarIcon:connect(TBI, taskbar_right_down, [{callback,fun(Ev,_) -> io:format("Right clicked: ~p~n",[Ev]) end}]), wx_test_lib:wx_destroy(Frame,Config). + +toolbar(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo); +toolbar(Config) -> + Wx = wx:new(), + Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"), + TB = wxFrame:createToolBar(Frame), + wxToolBar:addTool(TB, 747, "PressMe", wxArtProvider:getBitmap("wxART_COPY", [{size, {16,16}}]), + [{shortHelp, "Press Me"}]), + + Add = fun(#wx{}, _) -> + wxToolBar:addTool(TB, -1, "Added", wxArtProvider:getBitmap("wxART_TICK_MARK", [{size, {16,16}}]), + [{shortHelp, "Test 2 popup text"}]) + end, + + wxFrame:connect(Frame, command_menu_selected, [{callback, Add}, {id, 747}]), + wxFrame:show(Frame), + wx_test_lib:wx_destroy(Frame,Config). |