dc.SetBackgroundMode(wxBRUSHSTYLE_TRANSPARENT);
}
- wxCoord x_orig = x;
+ wxCoord x_orig = GetParent()->GetPosition().x;
while (hasTabs)
{
// the string has a tab
wxRichTextParagraph* para = wxDynamicCast(GetParent(), wxRichTextParagraph);
wxASSERT (para != NULL);
+ int relativeX = position.x - GetParent()->GetPosition().x;
wxRichTextAttr textAttr(para ? para->GetCombinedAttributes(GetAttributes()) : GetAttributes());
partialExtents->Add(oldWidth + p[j]);
if (partialExtents->GetCount() > 0)
- absoluteWidth = (*partialExtents)[(*partialExtents).GetCount()-1] + position.x;
+ absoluteWidth = (*partialExtents)[(*partialExtents).GetCount()-1] + relativeX;
else
- absoluteWidth = position.x;
+ absoluteWidth = relativeX;
}
else
{
}
notFound = false;
- width = nextTabPos - position.x;
+ width = nextTabPos - relativeX;
if (partialExtents)
partialExtents->Add(width);