Clipping longText to Fit Screen
Article Metadata
Here, is the code to do so,
const CFont* myFont = iEikonEnv->DenseFont();
TBuf<100> buffer;
TInt aMaxWidthInPixels; //depending on your screen dimensions use this, for 176x208
//I use 100.
buffer.Copy(_L("BackStreet Boys Music tracks"));
AknTextUtils::ClipToFit(buffer,*myFont, aMaxWidthInPixels, AknTextUtils::EClipFromEnd,
KDefaultClipWidth,_L("..."));
Now use this "buffer" in your Drawtext() method.


(no comments yet)