Hi to all,
I m making grid application.
in view.cpp file,
void ChellogridAppView::ConstructL( const TRect& aRect )
{
CreateWindowL();
iGrid = new( ELeave ) CAknGrid;
iGrid->SetContainerWindowL( *this );
TResourceReader reader;
CEikonEnv::Static()->CreateResourceReaderLC(reader, R_SELECTIONGRID);
iGrid->ConstructFromResourceL(reader);
iGrid->ActivateL();
iGrid->SetFocus(ETrue);
iGrid->DrawNow();
CleanupStack::PopAndDestroy()
SetRect( aRect );
ActivateL();
}
an in .rss file
RESOURCE GRID r_selectiongrid
{
//height = 5; // in items
//width = 10;
flags = EAknListBoxSelectionGrid;
style = r_selectiongrid_style;
array_id = r_selectiongrid_items;
}
RESOURCE GRID_STYLE r_selectiongrid_style
{
layoutflags = EAknGridHorizontalOrientation |
EAknGridLeftToRight | EAknGridTopToBottom;
primaryscroll = EAknGridFollowsItemsAndLoops;
secondaryscroll = EAknGridFollowsItemsAndLoops;
itemsinprimaryorient = 3;
itemsinsecondaryorient = 3;
gapwidth = 5;
gapheight = 5;
width = 20;
height = 20;
}
RESOURCE ARRAY r_selectiongrid_items
{
items =
{
LBUF { txt = "aaa"; },
LBUF { txt = "bbb"; },
LBUF { txt = "ccc"; },
LBUF { txt = "ddd"; }
};
}
My problem is the program do not show me grid but yes only scroll bar.
I haven't use draw function n i think bcoz of that my grid hides...is that so?
Plz help
Symbee




