Не удлиняется AuiToolBar Topic is solved

Это русская секция форума wxWidjets. В этой секции вы можете обсуждать любые вопросы, связанные с wxWidgets на вашем родном языке.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am

Не удлиняется AuiToolBar

Post by cutecode »

как сделать toolbar на всю длину окна? Или хотя бы заставить его менять размер по мере добавления новых элементов.


Хочу добавить wxAuiToolBar в нижнюю часть wxMDIParentFrame чтоб по мере открытия окон MDI они добавлялись в этот toolbar.
Однако после команды AddTool сам ToolBar не удлиняется.
функция Realize() не помогает

создаю toolbar при инициализации приложения

Code: Select all

	m_pBottomToolBar = new wxMyAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(3000, 30), wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_OVERFLOW | wxAUI_TB_HORIZONTAL | wxAUI_TB_TEXT);

	m_pBottomToolBar->SetToolBitmapSize(wxSize(roolbar_CX, roolbar_CY));
	::SetBackgroundColour(m_pBottomToolBar, GetFormBgColor());
	m_pBottomToolBar->Realize();

	m_mgr.AddPane(m_pBottomToolBar, wxAuiPaneInfo().
		Name(wxT("Панель нижняя")).Caption(wxT("Панель основная нижняя)")).
		ToolbarPane().Bottom().
		SetFlag(wxAuiPaneInfo::optionActive, 0).
		Row(3)
		);
по мере открытия окон вызываю

Code: Select all

	wxBitmap tb2_bmp0 = wxArtProvider::GetBitmap(wxART_GOTO_LAST, wxART_TOOLBAR, wxSize(roolbar_CX, roolbar_CY));
	GetMyFramePtr()->m_pBottomToolBar->AddTool(wxID_OPEN, get_trunslation(m_szTitle), tb2_bmp0);
	GetMyFramePtr()->m_pBottomToolBar->Realize();

	GetMyFramePtr()->m_mgr.Update();
You do not have the required permissions to view the files attached to this post.
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7481
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Не удлиняется AuiToolBar

Post by ONEEYEMAN »

Dobrogo vremeni sutok,
Poigratsja so stiljami probovali?
Kstati, ghbvth auidemo vrode pokazyvaet toolbar na vsju dlinu okna...
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am

Re: Не удлиняется AuiToolBar

Post by cutecode »

1. со стилями игрался
2. в примерах toolbar не на всю ширину
You do not have the required permissions to view the files attached to this post.
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am

Re: Не удлиняется AuiToolBar

Post by cutecode »

хотя нашел в примере свойство Resizable, вроде помогло.
СПС
Только высота теперь маленькая. Как бы ее увеличить?
You do not have the required permissions to view the files attached to this post.
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 427
Joined: Fri Dec 09, 2016 7:28 am

Re: Не удлиняется AuiToolBar

Post by cutecode »

все решил, помогло

спасибо

Code: Select all

Resizable().MinSize(wxSize(3000, 30))
You do not have the required permissions to view the files attached to this post.
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru