我今天有一个小问题..
我正在尝试创建一个aui,如wx模块的演示程序所示。 无论我做什么,实际标签的大小都不会改变。
他们大约在400乘以50,我无法理解为什么。
我想可能是在我打电话的时候
Manager = wxAuiManager:new([{managed_wnd, Panel}]),
我需要设置它的大小,但是没有大小选项,也没有我能说的命令。
这是我用来初始化的代码:
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.
非常感谢任何想法。
最佳-B
答案 0 :(得分:1)
我使用SetSizeHints()
答案 1 :(得分:0)
问题解决了,
不要将笔记本添加到wxSizer ...