×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Sep 2010
    Location
    India
    Posts
    75

    Buttons Created using Resources not displayed not displayed on device

    hi all,

    Strange issues seems to hav a affinity for me.

    I have Created buttons using resources and it works fine in emulator. But on device the buttons are not displayed. It enters the the fn where i create buttons...but still the buttons r missing...

    Here's how I create button :

    Code:
    void Demo:CreateButtonUsingResource()
    {
       iNextButton = CAknButton::NewL();
        iNextButton->ConstructFromResourceL(R_FIRST_BUTTON);
        iNextButton->SetContainerWindowL(*this);
        iNextButton->SetRect(TRect ( TPoint(530,310), TSize(30,20) ) );
        iNextButton->SetObserver(this);
        iNextButton->MakeVisible(ETrue);
        iNextButton->ActivateL();
    }
    Here's my resource file:

    Code:
    RESOURCE AVKON_BUTTON r_first_button
        {
        flags  = KAknButtonNoFrame;
        states =
            {
            AVKON_BUTTON_STATE
                {
                helptxt = "";
                bmpfile = BUTTON_IMAGE; 
                bmpid = EMbmdemoNext;
                bmpmask = EMbmdemoNext_mask;
                },
            AVKON_BUTTON_STATE
                {
                flags = KAknButtonStateHasLatchedFrame;
                bmpfile = BUTTON_IMAGE; 
                bmpid = EMbmdemoNext;
                bmpmask = EMbmdemoNext_mask;
                }            
            };
        }
    I understand that harcoding d SetRect values for button is not a bright idea....but can tht be d reason for not displaying it at all..i tried a couple of permutation-combination with the co-ordinates. Noting worked....

    Ny thing tht I'm missing..???
    aniticipating ny kind of clue,suggestions,help....i lost it again...

  2. #2
    Regular Contributor
    Join Date
    Sep 2010
    Location
    India
    Posts
    75

    Re: Buttons Created using Resources not displayed not displayed on device

    The buttons are visible when i do the default, but not otherwsie...i'm using the same mbm file i use for other icons which are visble but only the buttons dissapear....

    RESOURCE AVKON_BUTTON r_first_button
    {
    flags = KAknButtonTextInsideFrame;
    states =
    {
    AVKON_BUTTON_STATE
    {
    helptxt = "First";
    bmpfile = AVKON_BITMAP_FILE;
    bmpid = EMbmAvkonQgn_note_query;
    bmpmask = EMbmAvkonQgn_note_query_mask;
    },
    AVKON_BUTTON_STATE
    {
    flags = KAknButtonStateHasLatchedFrame;
    bmpfile = AVKON_BITMAP_FILE;
    bmpid = EMbmAvkonQgn_note_query;
    bmpmask = EMbmAvkonQgn_note_query_mask;
    }
    };
    }


    Plz help..i feel this is a trivial issue....nd i'm missing out sumthing silly...plz help...

Similar Threads

  1. Dialog buttons not displayed
    By juannoguera in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-11-16, 07:46
  2. Image not displayed when jar file is created
    By knights123 in forum Mobile Java General
    Replies: 7
    Last Post: 2009-08-24, 07:13
  3. Form not displayed when is created in Container ConstructL
    By redbart in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-04-01, 10:30
  4. Replies: 3
    Last Post: 2008-03-03, 11:44
  5. Replies: 1
    Last Post: 2006-02-26, 14:23

Posting Permissions

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