aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/test
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2015-12-07 11:28:10 +0100
committerDan Gudmundsson <[email protected]>2015-12-07 14:18:24 +0100
commitda80d59e56bc8318c6561173b13a4f6904d4758d (patch)
treef9df33482f6dfe38eb7d008576d325ffdfa693a9 /lib/wx/test
parent7a13283ac6f4a7738dbe2a2ccfce392a820dca2a (diff)
downloadotp-da80d59e56bc8318c6561173b13a4f6904d4758d.tar.gz
otp-da80d59e56bc8318c6561173b13a4f6904d4758d.tar.bz2
otp-da80d59e56bc8318c6561173b13a4f6904d4758d.zip
wx: Add toolbar stretchablespace
Available since 3.0
Diffstat (limited to 'lib/wx/test')
-rw-r--r--lib/wx/test/wx_class_SUITE.erl13
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).