RE: Question on List
struct Struct
{
Int i;
Str s;
}data[4]=
{
{1, "one"},
{2, "two"},
{3, "three"},
{4, "four"},
};
ListGroup list_group[]=
{
ListGroup(MEMBER(Struct,i),0.3f,L"Integer"),
ListGroup(MEMBER(Struct,s),0.5f,L"String" ),
};
Window window;
Region region;
List<Struct> list;
Bool Init(void)
{
...
Gui +=window.create(Rect(-0.5f , -0.4f, 0.5f , 0.4f),"Window with list");
window+=region.create(Rect( 0.05f, -0.6f, 0.95f, -0.1f));
region+=list .create(list_group,ELMS(list_group)).setData(data,ELMS(data));
...
}
|