本文整理汇总了C++中BTabView::ResizeBy方法的典型用法代码示例。如果您正苦于以下问题:C++ BTabView::ResizeBy方法的具体用法?C++ BTabView::ResizeBy怎么用?C++ BTabView::ResizeBy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BTabView
的用法示例。
在下文中一共展示了BTabView::ResizeBy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BMessage
void
TTimeWindow::_InitWindow()
{
SetPulseRate(500000);
fDateTimeView = new DateTimeView(Bounds());
BRect bounds = fDateTimeView->Bounds();
fTimeZoneView = new TimeZoneView(bounds);
fBaseView = new TTimeBaseView(bounds, "baseView");
AddChild(fBaseView);
fBaseView->StartWatchingAll(fDateTimeView);
fBaseView->StartWatchingAll(fTimeZoneView);
bounds.OffsetBy(10.0, 10.0);
BTabView *tabView = new BTabView(bounds.InsetByCopy(-5.0, -5.0),
"tabView" , B_WIDTH_AS_USUAL, B_FOLLOW_NONE);
BTab *tab = new BTab();
tabView->AddTab(fDateTimeView, tab);
tab->SetLabel("Date & Time");
tab = new BTab();
tabView->AddTab(fTimeZoneView, tab);
tab->SetLabel("Time zone");
fBaseView->AddChild(tabView);
tabView->ResizeBy(0.0, tabView->TabHeight());
BRect rect = Bounds();
rect.left = 10;
rect.top = rect.bottom - 10;
fRevertButton = new BButton(rect, "revert", "Revert",
new BMessage(kMsgRevert), B_FOLLOW_LEFT | B_FOLLOW_BOTTOM, B_WILL_DRAW);
fRevertButton->ResizeToPreferred();
fRevertButton->SetEnabled(false);
float buttonHeight = fRevertButton->Bounds().Height();
fRevertButton->MoveBy(0, -buttonHeight);
fBaseView->AddChild(fRevertButton);
fRevertButton->SetTarget(this);
fBaseView->ResizeTo(tabView->Bounds().Width() + 10.0,
tabView->Bounds().Height() + buttonHeight + 30.0);
ResizeTo(fBaseView->Bounds().Width(), fBaseView->Bounds().Height());
}