views:

33

answers:

1

Hi Everyone,

Im having a small issue today..

I am trying to create an aui as shown in the demo program of the wx module. The size of the actual tabs will not change no matter what I do.

They stay at about 400 by 50 and I can't understand why.

I think it may be when I call

Manager = wxAuiManager:new([{managed_wnd, Panel}]),

I need to set its size, but there are no options for size, nor commands that work as far as I can tell.

This is the code I use to init:

   Server = wx:new(),
     process_flag(trap_exit, true),
    Frame = wxFrame:new(wx:null(), ?wxID_ANY, "TIBRA - TOP SECRET - Plutonyx Systems, LLC", [{size,{1500, 1000}}]),  %%%REFERENCE TO WINDOW



     wxFrame:connect(Frame, command_menu_selected),

    Panel  = wxPanel:new(Frame, [{size, {0, 0}}]),  %%% REF TO PANEL IN FRAME

    Manager = wxAuiManager:new([{managed_wnd, Panel}]),

    Pane = ?pi:new(),
    ?pi:closeButton(Pane),
    ?pi:right(Pane),
    ?pi:dockable(Pane, [{b, true}]),
    ?pi:floatingSize(Pane, 300,200),
    ?pi:minSize(Pane, {500,500}),
    ?pi:paneBorder(Pane),
    ?pi:floatable(Pane, [{b, true}]),
    Notebook = create_notebook(Panel, Manager, Pane),

 create_notebook(Parent, Manager, Pane) ->
    Style = (0
         bor ?wxAUI_NB_DEFAULT_STYLE
         bor ?wxAUI_NB_TOP
         bor ?wxAUI_NB_WINDOWLIST_BUTTON
         bor ?wxAUI_NB_CLOSE_ON_ACTIVE_TAB
         bor ?wxAUI_NB_TAB_MOVE
         bor ?wxAUI_NB_SCROLL_BUTTONS
        ),

    Notebook = wxAuiNotebook:new(Parent, [{style, Style}, {size, {3050,200}}]),

    Tab1 = wxPanel:new(Notebook, [{size, {3050,200}}]),
    wxPanel:setBackgroundColour(Tab1, ?wxBLACK),
    wxButton:new(Tab1, ?wxID_ANY, [{label,"New tab"}]),

    listbox:createListBox(Tab1),
    wxAuiNotebook:addPage(Notebook, Tab1, "You can", []),

    Tab2 = wxPanel:new(Notebook, [{size, {3050,200}}]),
    wxPanel:setBackgroundColour(Tab2, ?wxRED),
    wxButton:new(Tab2, ?wxID_ANY, [{label,"New tab"}]),
    wxAuiNotebook:addPage(Notebook, Tab2, "rearrange", []),

    Tab3 = wxPanel:new(Notebook, [{size, {3050,200}}]),
    wxPanel:setBackgroundColour(Tab3, ?wxGREEN),
    wxButton:new(Tab3, ?wxID_ANY, [{label,"New tab"}]),
    wxAuiNotebook:addPage(Notebook, Tab3, "these tabs", []),

    %%wxAuiManager:setDockSizeConstraint(Manager, 5000, 2000),
    wxAuiManager:addPane(Manager, Notebook, Pane),

    wxAuiNotebook:connect(Notebook, command_button_clicked),
    wxAuiNotebook:connect(Notebook, command_auinotebook_page_close, [{skip, false}]),
    wxAuiNotebook:connect(Notebook, command_auinotebook_page_changed),
    Notebook.

Any ideas would be greatly appreciated.

Best -B

A: 

Problem solved,

Dont add the Notebook to wxSizer...