[erlang-questions] Wx Toolbars in Erlang

Hosszú Gábor <>
Mon Jan 14 09:25:43 CET 2013


I have started to implement a GUI for an Erlang software but I have  
some problems with Wx Toolbars. I googled it and searched in the Wx  
docs but found nothing so I think that it may be an Erlang Wx related  
problem (or I am doing something wrong).

I have a window and a toolbar in it which is created at the startup as  
it is shown and coded in the Erlang wx demo (my one has no tools on  
it). I have to add buttons to this toolbar dinamically and remove  
other buttons so I want to alter the whole toolbar dinamically. I have  
a function which is ran in those cases when I have to modify the  
my_fun() ->
     Frame = wx:typeCast(wxWindow:findWindowByName("win"), wxFrame),
     TB = wxFrame:getToolBar(Frame),
     BM = wxBitmap:new(...,[{type,?wxBITMAP_TYPE_JPEG}]),
     wxToolBar:addTool(TB, 1, "label", BM),
(and the path at ... is correct and valid)
I have double checked that my fun is executed but nothing is added to  
the toolbar.
How can I solve this problem?


More information about the erlang-questions mailing list