Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor aluzi's Avatar
    Join Date
    Mar 2008
    Posts
    77
    I write code in my "CTestAppView"(inherit from "CCoeControl") ConstructL() funtion:

    Code:
    	// Create a window for this application view
    	CreateWindowL();
    
    	iListBox = new ( ELeave ) CAknSingleStyleListBox;
    	iListBox->SetContainerWindowL( *this );
    		{
    		TResourceReader reader;
    		iEikonEnv->CreateResourceReaderLC( reader, R_MY_LIST_BOX );
    		iListBox->ConstructFromResourceL( reader );
    		CleanupStack::PopAndDestroy(); // reader internal state
    		}
    	// the listbox owns the items in the list and will free them
    	iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
    	
    	iListBox->SetFocus( ETrue );
    
    	// Set the windows size
    	SetRect(aRect);
    
    	// Activate the window, which makes it ready to be drawn
    	ActivateL();
    Run this program, the UI is blank white, the listbox created but I can't see it.....

  2. #2
    Registered User Kavit Patel's Avatar
    Join Date
    Nov 2007
    Posts
    444
    Hi Aluzi,

    Have you implemented
    CountComponentControls() and ComponentControl(TInt aIndex) methods in your container class?

    Regards,
    Kavit.

  3. #3
    Regular Contributor parthasaradhi6's Avatar
    Join Date
    Oct 2007
    Posts
    80
    Hi please go througth below link,
    http://wiki.forum.nokia.com/index.ph...using_resource

  4. #4
    Super Contributor eswar_illuri's Avatar
    Join Date
    May 2005
    Location
    Hyderabad,India
    Posts
    704
    Hi,

    Have you implemented virtual functions deriving from CCoeControl SizeChanged(),CountComponentControls() and ComponentControl() properly? Just check the listbox related documents in SDK doc. And lot of examples in forum nokia related to listbox, just go through it.

    Regards,
    Eswar

  5. #5
    Hi,
    pls go through the following link..
    http://wiki.forum.nokia.com/index.ph...using_resource

    By,
    Chandra.

  6. #6
    Regular Contributor mohd kashif's Avatar
    Join Date
    Dec 2007
    Location
    India
    Posts
    155
    Quote Originally Posted by aluzi View Post
    I write code in my "CTestAppView"(inherit from "CCoeControl") ConstructL() funtion:

    Code:
    	// Create a window for this application view
    	CreateWindowL();
    
    	iListBox = new ( ELeave ) CAknSingleStyleListBox;
    	iListBox->SetContainerWindowL( *this );
    		{
    		TResourceReader reader;
    		iEikonEnv->CreateResourceReaderLC( reader, R_MY_LIST_BOX );
    		iListBox->ConstructFromResourceL( reader );
    		CleanupStack::PopAndDestroy(); // reader internal state
    		}
    	// the listbox owns the items in the list and will free them
    	iListBox->Model()->SetOwnershipType( ELbmOwnsItemArray );
    	
    	iListBox->SetFocus( ETrue );
    
    	// Set the windows size
    	SetRect(aRect);
    
    	// Activate the window, which makes it ready to be drawn
    	ActivateL();
    Run this program, the UI is blank white, the listbox created but I can't see it.....

    Hi use this in SizeChanged()
    {
    iListBox->SetExtent(TPoint(0,0), iListBox->MinimumSize() );
    }

    May be helpfull for u.

    regards
    Md.kashif

  7. #7
    Regular Contributor parag_purkar's Avatar
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311
    Hi ,
    if you are using SetExtent

    HTML Code:
    iListBox = new(ELeave) CAknSingleNumberStyleListBox();
    iListBox->ConstructL(this);
    iListBox->SetContainerWindowL(*this);
    const TPoint aPoint(0,0);
    const TSize aSize(180,160);
    iListBox->SetExtent(aPoint,aSize);
    Regards,
    Parag Purkar
    Last edited by parag_purkar; 2008-04-02 at 13:59.

  8. #8
    Regular Contributor mohd kashif's Avatar
    Join Date
    Dec 2007
    Location
    India
    Posts
    155
    Quote Originally Posted by parag_purkar View Post
    Hi ,
    1)Check for Item format of list box.
    e.g
    HTML Code:
     _LIT(KListItemFormat,"%d\t%s\t\t");
    2)if you are using SetExtent

    HTML Code:
    iListBox = new(ELeave) CAknSingleNumberStyleListBox();
    iListBox->ConstructL(this);
    iListBox->SetContainerWindowL(*this);
    const TPoint aPoint(0,0);
    const TSize aSize(180,160);
    iListBox->SetExtent(aPoint,aSize);

    Regards,
    Parag Purkar

    hi Parag when in this thread use only CAknSingleStyleListBox, why u told format of CAknSingleNumberStyleListBox().Here no need for this format
    _LIT(KListItemFormat,"%d\t%s\t\t");

    Regards
    Md.kashif

  9. #9
    Regular Contributor parag_purkar's Avatar
    Join Date
    Feb 2006
    Location
    India,Pune
    Posts
    311
    Yes Kashif you are correct I made correction in my post

Similar Threads

  1. How to create Numeric Editor in ListBox..
    By revasenthil in forum Symbian C++
    Replies: 6
    Last Post: 2008-01-05, 17:21
  2. ListBox Errors
    By javadi82 in forum Symbian User Interface
    Replies: 7
    Last Post: 2006-11-08, 13:29
  3. How can create specific ListBox ?
    By comb in forum Symbian C++
    Replies: 0
    Last Post: 2005-05-01, 19:26
  4. Create dialog like control with softkeys
    By gugelmin in forum Symbian C++
    Replies: 4
    Last Post: 2003-09-23, 13:41
  5. how to create checkbox control on view?
    By divakar_rp in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-05-28, 14:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved