diff options
author | Dan Gudmundsson <[email protected]> | 2015-12-08 10:03:38 +0100 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2015-12-08 10:03:38 +0100 |
commit | 04e6a4bec37a212c5639983b61f23aa4d5118bfb (patch) | |
tree | 2ea093cd5a12811b2d58e8b496033dcfe3923708 /lib/wx/test | |
parent | 9be3ffd7bbb7fbf386fe7857b3ff9c9803e91cc7 (diff) | |
parent | da80d59e56bc8318c6561173b13a4f6904d4758d (diff) | |
download | otp-04e6a4bec37a212c5639983b61f23aa4d5118bfb.tar.gz otp-04e6a4bec37a212c5639983b61f23aa4d5118bfb.tar.bz2 otp-04e6a4bec37a212c5639983b61f23aa4d5118bfb.zip |
Merge branch 'dgud/wx/add-toolbar-func' into maint
* dgud/wx/add-toolbar-func:
wx: Add toolbar stretchablespace
Diffstat (limited to 'lib/wx/test')
-rw-r--r-- | lib/wx/test/wx_class_SUITE.erl | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl index 93a4c24a84..876db9893f 100644 --- a/lib/wx/test/wx_class_SUITE.erl +++ b/lib/wx/test/wx_class_SUITE.erl @@ -526,14 +526,19 @@ 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}}]), + BM1 = wxArtProvider:getBitmap("wxART_COPY", [{size, {16,16}}, {client, "wxART_TOOLBAR"}]), + BM2 = wxArtProvider:getBitmap("wxART_TICK_MARK", [{size, {16,16}}, {client, "wxART_TOOLBAR"}]), + wxToolBar:addTool(TB, 747, "PressMe", BM1, [{shortHelp, "Press Me"}]), - + catch wxToolBar:addStretchableSpace(TB), %% wxWidgets 3.0 only Add = fun(#wx{}, _) -> - wxToolBar:addTool(TB, -1, "Added", wxArtProvider:getBitmap("wxART_TICK_MARK", [{size, {16,16}}]), - [{shortHelp, "Test 2 popup text"}]) + wxToolBar:addTool(TB, -1, "Added", BM2, + [{shortHelp, "Test 2 popup text"}]), + catch wxToolBar:addStretchableSpace(TB), %% wxWidgets 3.0 only + wxToolBar:realize(TB) end, + wxToolBar:realize(TB), wxFrame:connect(Frame, command_menu_selected, [{callback, Add}, {id, 747}]), wxFrame:show(Frame), wx_test_lib:wx_destroy(Frame,Config). |