// do we have a TabControl ? if ( pTabControl )
{ // adapt offset for other controls by an extra distance if ( nOffY )
nOffY += IMPL_DIALOG_BAR_OFFSET*2 + 2;
Point aTabOffset( IMPL_DIALOG_OFFSET, IMPL_DIALOG_OFFSET+nOffY );
if (isContainerWindow(*pTabControl))
pTabControl->SetSizePixel(pTabControl->get_preferred_size());
// position all other Children bool bTabCtrl = false; int nLines = 0;
tools::Long nX;
tools::Long nY = aDlgSize.Height();
tools::Long nTopX = IMPL_DIALOG_OFFSET;
// all buttons are right aligned under Windows 95
nX = IMPL_DIALOG_OFFSET;
tools::Long nCtrlBarWidth = ((aCtrlSize.Width()+IMPL_DIALOG_OFFSET)*nDownCtrl)-IMPL_DIALOG_OFFSET; if ( nCtrlBarWidth <= aTabSize.Width() )
nX = aTabSize.Width() - nCtrlBarWidth + IMPL_DIALOG_OFFSET;
vcl::Window* pChild2 = GetWindow( GetWindowType::FirstChild ); while ( pChild2 )
{ if ( pChild2->IsVisible() )
{ if ( pChild2 == pTabControl )
bTabCtrl = true; elseif ( bTabCtrl )
{ if ( !nLines )
nLines = 1;
if ( nX+aCtrlSize.Width()-IMPL_DIALOG_OFFSET > aTabSize.Width() )
{
nY += aCtrlSize.Height()+IMPL_DIALOG_OFFSET;
nX = IMPL_DIALOG_OFFSET;
nLines++;
}
void TabDialog::StateChanged( StateChangedType nType )
{ if ( nType == StateChangedType::InitShow )
{ // Calculate the Layout only for the initialized state if ( mbPosControls )
ImplPosControls();
}
Dialog::StateChanged( nType );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.