Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
How to show tooltips in Symbian applications
A Tooltip is a small rectangular dialog that comes up as a help/description when you pause over a partucular control. It can either stay or dismiss in sometime.
Derive a container from CCoeControl, and in its ConstructL set the size of the rectangle of the tooltip along with the position where you want to show the tooltip.
iText->SetExtent(TPoint( 15, 15 ),iText->MinimumSize() );
iText here is a RichTextEditor.
void CTooltipContainer::Draw( const TRect& aRect ) const
///Make a Tooltip like rectangle
iRect = aRect;
CWindowGc& gc = SystemGc();
gc.SetBrushColor( TLogicalRgb( TRgb(254,255,213) ) );
This tooltip can be shown depending upon a HandleKeyEventL/HandleCommandL or use a Timer to detect pause on a control and then show the tooltip.
A good tooltip example is the Active Standby screen of S60 2nd ED FP3 onwards devices, where the active standby apps display a tooltip of the app name.
The code above is simple and works as long as you always draw the tooltip topmost in the controller. You can create a floating tooltip by using a separate window, removing the coupling, see http://mikie.iki.fi/symbian/textbox.html .