×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Question Problem creating custom label

    Hi,
    I am trying to create a custom label. For this i have designed a class derived from CCoeControl. I have CEikLabel as its data member. I have written wrapper functions to set text, position and size of the label. I am overriding the Draw function, setting background rect of label with a color.

    Problem is that when i create this custom label in view class(derived from CCoeControl) the Draw function of my label is not getting called. In view i have also written ComponentControls() and CountComponentControls(). Please tell me if i am missing out anything ....

    Thanks in advance,
    Amar.

  2. #2
    Super Contributor
    Join Date
    Jan 2007
    Location
    Bhubaneswar, India
    Posts
    1,189
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  3. #3
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Re: Problem creating custom label

    Hi Ram,
    Thanks a lot for those links. I am trying the code given in first link (for custom control : label).
    I am facing a problem in it .. I debugged the code and found out that the emulator panics at the line "Components().AppendLC(iLabel)". Please help...

    Thanks,
    Amar.

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

    Re: Problem creating custom label

    Quote Originally Posted by amar_wagholikar View Post
    Hi Ram,
    Thanks a lot for those links. I am trying the code given in first link (for custom control : label).
    I am facing a problem in it .. I debugged the code and found out that the emulator panics at the line "Components().AppendLC(iLabel)". Please help...

    Thanks,
    Amar.
    you can put exact panic code here.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  5. #5
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Re: Problem creating custom label

    Hi Ram,

    It displays CONE 11 ... What is causing this ?

    Thanks,
    Amar.

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

    Re: Problem creating custom label

    Quote Originally Posted by amar_wagholikar View Post
    Hi Ram,

    It displays CONE 11 ... What is causing this ?

    Thanks,
    Amar.


    CONE 11 means :The control cannot close the window as it does not own one
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  7. #7
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Re: Problem creating custom label

    Custom label that i have is a data member of appview derived from CCoeControl not CAknView. I am creating obj of custom label in ConstructL of this aapview. Is this a problem?

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

    Re: Problem creating custom label

    Quote Originally Posted by amar_wagholikar View Post
    Custom label that i have is a data member of appview derived from CCoeControl not CAknView. I am creating obj of custom label in ConstructL of this aapview. Is this a problem?
    you can show your piece of code here or in first link there is CustomControl Zip file. So you can download from given link and take help.
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

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

    Re: Problem creating custom label

    check this link if you are looking for the same.

    http://wiki.forum.nokia.com/index.ph...tomControl.zip
    -------------------------------------
    Thanks & Regards
    Ram
    Symbian OS 9.2/9.3,S60 3rd FP1/FP2,Carbide.c++v2.0

  10. #10
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Re: Problem creating custom label

    Hi Ram,
    The panic was resolved when i wrote SetRect() before Components().AppendLC(iLabel) ... I dont knw the reason why i did this ... but it solved the prob.

    If instead of using CEikLabel, I display a string (DrawText())... how will I set boundaries (Rect) of this control?

    Thanks,
    Amar.

  11. #11
    Regular Contributor
    Join Date
    Aug 2005
    Location
    India
    Posts
    399

    Re: Problem creating custom label

    Use Carbide UI designer to create view with Label. you can better understand how the things work and how to solve it.

  12. #12
    Regular Contributor
    Join Date
    May 2009
    Posts
    51

    Re: Problem creating custom label

    Hi,

    I finnaly managed to create my first custom label. Thanks guys for ur help.

    Regards,
    Amar

Similar Threads

  1. Creating custom items crashes Nokia 6630 jvm
    By handtems in forum Mobile Java General
    Replies: 5
    Last Post: 2006-06-20, 15:21
  2. problem with displaying label in view..........
    By platinnum in forum Symbian C++
    Replies: 1
    Last Post: 2005-04-25, 04:03
  3. problem creating my own menu for form
    By alice77 in forum Symbian User Interface
    Replies: 2
    Last Post: 2003-11-21, 13:20
  4. problem with a lon link label on 7210
    By leguman in forum Mobile Web Site Development
    Replies: 1
    Last Post: 2002-10-17, 09:45
  5. Problem with bldmake bldfiles for Series 60 SDK 6.1
    By dml in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 1970-01-01, 02:00

Posting Permissions

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