×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    CEikLabel underline text issue!

    Hi,

    I am trying to create an underlined label. Label text is underlined, when i run the application on the emulator, however on actual device it is not showing Underlined text. I am testing the application, on Nokia N91 and N97.

    //code
    _LIT(KTextrajeevsahu, "www.rajeevsahu.com");
    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL(KTextrajeevsahu);
    iLabel->SetUnderlining(ETrue);
    iLabel->SetLabelAlignment(ELayoutAlignCenter);
    const CFont* aPlainFont = LatinBold19();
    iLabel->SetFont(aPlainFont);
    iLabel->OverrideColorL( EColorLabelText, KRgbDarkGreen );
    iLabel->OverrideColorL(EColorControlBackground, KRgbWhite );

    kindly let me know why this is happening and how to overcome this. Is it possible to Link a website on a label with click(select) facility, so that when anybody clicks on the label, it'll divert to that particular link???

    Thanks,
    Last edited by RajeevSahu; 2009-11-16 at 10:00.

  2. #2
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: CEikLabel underline text issue!

    Quote Originally Posted by RajeevSahu View Post
    Hi,

    I am trying to create an underlined label. Label text is underlined, when i run the application on the emulator, however on actual device it is not showing Underlined text. I am testing the application, on Nokia N91 and N97.

    //code
    _LIT(KTextrajeevsahu, "www.rajeevsahu.com");
    iLabel = new (ELeave) CEikLabel;
    iLabel->SetContainerWindowL( *this );
    iLabel->SetTextL(KTextrajeevsahu);
    iLabel->SetUnderlining(ETrue);
    iLabel->SetLabelAlignment(ELayoutAlignCenter);
    const CFont* aPlainFont = LatinBold19();
    iLabel->SetFont(aPlainFont);
    iLabel->OverrideColorL( EColorLabelText, KRgbDarkGreen );
    iLabel->OverrideColorL(EColorControlBackground, KRgbWhite );

    kindly let me know why this is happening and how to overcome this. Is it possible to Link a website on a label with click(select) facility, so that when anybody clicks on the label, it'll divert to that particular link???

    Thanks,
    check this link,may be you get some help.
    http://discussion.forum.nokia.com/fo...ad.php?t=88995
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  3. #3
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: CEikLabel underline text issue!

    Quote Originally Posted by RB_Sahu View Post
    check this link,may be you get some help.
    http://discussion.forum.nokia.com/fo...ad.php?t=88995
    Hi RB_Sahu,

    I didn't get any help from that link. If you have anything else please let me know!

    Thanks

  4. #4
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: CEikLabel underline text issue!

    have you change as given below

    iLabel->SetUnderlining(EFalse);
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  5. #5
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: CEikLabel underline text issue!

    yes, i tried that one! This ultimately removes underline from the label text!!!

    to set the underline you have to use
    iLabel->SetUnderlining(ETrue);

    However underline is not set on device like in emulator!

  6. #6
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: CEikLabel underline text issue!

    Quote Originally Posted by RajeevSahu View Post
    yes, i tried that one! This ultimately removes underline from the label text!!!

    to set the underline you have to use
    iLabel->SetUnderlining(ETrue);

    However underline is not set on device like in emulator!
    I suggest you to do more search in this form or in wiki.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  7. #7
    Super Contributor
    Join Date
    Sep 2007
    Posts
    1,005

    Re: CEikLabel underline text issue!

    Quote Originally Posted by RajeevSahu View Post
    yes, i tried that one! This ultimately removes underline from the label text!!!

    to set the underline you have to use
    iLabel->SetUnderlining(ETrue);

    However underline is not set on device like in emulator!
    have u active the control yet?

    void CHelloWorldBasicAppView::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    iLabel=new(ELeave) CEikLabel;
    iLabel->SetContainerWindowL(*this);
    iLabel->SetTextL(_L("iLabel"));
    iLabel->SetUnderlining(ETrue);

    iToDoLabel=new(ELeave) CEikLabel;
    iToDoLabel->SetContainerWindowL(*this);
    iToDoLabel->SetTextL(_L("iToDoLabel"));

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }

  8. #8
    Regular Contributor
    Join Date
    Aug 2009
    Posts
    331

    Re: CEikLabel underline text issue!

    Quote Originally Posted by oracle3 View Post
    have u active the control yet?

    void CHelloWorldBasicAppView::ConstructL(const TRect& aRect)
    {
    // Create a window for this application view
    CreateWindowL();

    iLabel=new(ELeave) CEikLabel;
    iLabel->SetContainerWindowL(*this);
    iLabel->SetTextL(_L("iLabel"));
    iLabel->SetUnderlining(ETrue);

    iToDoLabel=new(ELeave) CEikLabel;
    iToDoLabel->SetContainerWindowL(*this);
    iToDoLabel->SetTextL(_L("iToDoLabel"));

    // Set the windows size
    SetRect(aRect);

    // Activate the window, which makes it ready to be drawn
    ActivateL();
    }
    Yes, my friend i have used ActivateL(); also, but not able to see the underline!

    If you have any other options please let me know.

    Thanks a lot!

  9. #9
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189

    Re: CEikLabel underline text issue!

    check this link, may be it will help you.

    http://blog.csdn.net/eddy_0825/archi...0/1593234.aspx
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

Similar Threads

  1. Displaying the contents of a text file
    By dennis_munsie in forum Symbian
    Replies: 1
    Last Post: 2009-03-06, 06:08
  2. issue with overlaping text
    By shadow-2005 in forum Symbian User Interface
    Replies: 7
    Last Post: 2009-02-20, 08:43
  3. Issue with recurrent event PIM interface on N95 8Gb
    By gaggou in forum Mobile Java General
    Replies: 0
    Last Post: 2009-02-17, 16:28
  4. TextWrapper example class
    By miohtama in forum Symbian
    Replies: 6
    Last Post: 2008-03-08, 11:46
  5. Text Direction issue with displaying strings
    By iyuen in forum Mobile Java General
    Replies: 4
    Last Post: 2007-04-01, 00:55

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×