pTextObject->Compose();
dimension = pTextObject->GetTextExtentF(0, pTextObject->GetTextLength());
- contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ _ControlOrientation orientation = GetOrientation();
+ if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+ {
+ contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().width;
+ }
+ else
+ {
+ contentRect.width = _ControlManager::GetInstance()->GetScreenSizeF().height;
+ }
if (dimension.width > contentRect.width - GetBoundsF().x - __leftMargin * 2)
{