×

Discussion Board

Results 1 to 8 of 8

Thread: Draw() not call

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    142

    Draw() not call

    i use the drawNow firstly, the Draw() is called, but secondly, the Draw() is not called, why? how to solve it

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Draw() not call

    Can you explain in a bit more details on what is happening and what would you expect to happen, currently you are saying that something happens and does not happen, thus it is hard to understand on what is actually going on there.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    142

    Re: Draw() not call

    i write a button,that inherits from CCoeControl. i use the function
    "SetTitle(const TDesC& aTitle){ iTitle.Copy(aTitle); DrawNow();} "
    to set the text of the button. when the app load, i call the SetTitle(_L("A"), and the "A" could be displayed. after i press other CCoeControl, i call the SetTitle(_L("B"),
    but the button still display "A". i find after calling SetTitle(_L("B"),the draw() not called in debug

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Draw() not call

    Basically you should check the container controls ComponentControl as well as CountComponentControls functions are handled correctly. Also you should debug in the emulator to see what parts are getting executed and which are not.

  5. #5
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: Draw() not call

    Have you tried DrawDeferred()?

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Draw() not call

    Quote Originally Posted by teemup View Post
    Have you tried DrawDeferred()?
    According to SDK docs, that one simply Draws the control, with low priority., thus I would not see how it would help when the higher priority DrawNow would not work.

  7. #7
    Registered User
    Join Date
    Jul 2008
    Posts
    142

    Re: Draw() not call

    Quote Originally Posted by symbianyucca View Post
    Basically you should check the container controls ComponentControl as well as CountComponentControls functions are handled correctly. Also you should debug in the emulator to see what parts are getting executed and which are not.
    ComponentControl andCountComponentControls functions are correct

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Draw() not call

    ok, so then do debug the behaviour on a emulator, and remember to call DrawNow() to the container after changing the text, then the Containers Draw() should be called and after that andCountComponentControls once and ComponentControl for each control inside the main container. Which after each control's Draw() & ComponentControl andCountComponentControls functions would be called.

Similar Threads

  1. How to Draw Incoming Call Number
    By alfath.syahrian in forum Symbian
    Replies: 3
    Last Post: 2009-08-23, 04:13
  2. Default call to Draw Function
    By nisheethpandey in forum Symbian User Interface
    Replies: 6
    Last Post: 2009-02-17, 18:30
  3. DrawNow() failed to call Draw()
    By kishore84 in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-05-15, 16:15
  4. newbie: how to call draw() in an application
    By quintall in forum Symbian
    Replies: 13
    Last Post: 2008-01-23, 18:46
  5. how to draw text when call incoming
    By bankbreaker in forum Symbian
    Replies: 2
    Last Post: 2006-11-13, 07:19

Posting Permissions

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