<html><body style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 12px;">Dear List,<br />As mentioned in recent postings, learning wxErlang is challenging.<br />Any improvement to the documentation will be gratefully received.<br />In his wxErlang work-up Doug Edmunds states, 'the order of Sizers determines appearance'.<br />I have set '9' for W & H, and '5' for spacers as these are not yet working.<br />I will appreciate any suggestion for Spacer ordering and any links to other tutorials or examples.<br />Thank you in advance.<br /><br />-module(text_in_box).<br />-include_lib("wx/include/wx.hrl").<br />-compile([export_all]).<br />-export([make_window/0]).<br /><br />make_window() -><br /> S = wx:new(),<br /> F = wxFrame:new(S, 1, "text_in_box", [{size, {300, 300}}]),<br /> P = wxPanel:new(F),<br /> B = wxStaticBox:new(P, 2, "&Static box"),<br /><br /> wxPanel:setBackgroundColour(P, ?wxLIGHT_GREY),<br /> wxStaticBox:setBackgroundColour(B, ?wxBLUE),<br /> wxStaticBox:setLabel(B, "Static box"),<br /><br /> T = wxStaticText:new(P, 3, "Static text", []),<br /> wxStaticText:setLabel(T, "Vertical static text"),<br /><br /> Bs = wxStaticBoxSizer:new(?wxHORIZONTAL, P, [{label, "Horizontal static box sizer"}]),<br /> Ts = wxBoxSizer:new(?wxVERTICAL),<br /><br /> wxSizer:add(Bs, B, []),<br /> wxSizer:add(Bs, 9, 9, []),<br /> wxSizer:add(Bs, 9, 9, []),<br /> wxSizer:add(Ts, T, []),<br /> wxSizer:add(Ts, 9, 9, []),<br /> wxSizer:addSpacer(Ts, 5),<br /> wxSizer:addSpacer(Bs, 5),<br /> wxSizer:add(Bs, Ts, []),<br /> wxPanel:setSizer(P, Bs),<br /> wxFrame:show(F),<br /> % create two listeners<br /> wxFrame:connect(F, close_window),<br /> wxPanel:connect(P, command_button_clicked),<br /> loop(F),<br /> {F, Bs, Ts, self()}.<br /><br />loop(S) -><br /> receive<br /> #wx{event = #wxCommand{type = command_event}} -><br /> wxWindow:close(S, []),<br /> loop(S);<br /> #wx{event = #wxClose{type = close_window}} -><br /> ok<br /> end.<br /></body></html>