예제 #1
0
파일: WinMain.cs 프로젝트: xcgui/demo
    unsafe public void Create()
    {
        xc.XInitXCGUI("");
        int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15);

        int hList = XList.Create(0, 0, 300, 200, hWindow);

        XList.SetItemTemplateXML(hList, "..\\..\\List_Item.xml");
        XList.AddColumn(hList, 100);
        XList.AddColumn(hList, 100);

        int hHead = XAdapterMap.Create();

        XList.BindAdapterHeader(hList, hHead);
        XAdapterMap.AddItemText(hHead, "name", "第一列");
        XAdapterMap.AddItemText(hHead, "name2", "第二列");


        int body = XAdapterTable.Create();

        XList.BindAdapter(hList, body);
        XAdapterTable.AddColumn(body, "name");
        XAdapterTable.AddColumn(body, "name2");

        int nItem = XAdapterTable.AddItemText(body, "1.1");

        XAdapterTable.SetItemText(body, nItem, 1, "1.2");


        XWnd.ShowWindow(hWindow, 5);
        xc.XRunXCGUI();
        xc.XExitXCGUI();
    }