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(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 400, "xcgui", 0, 15); hListBox = XListBox.Create(0, 0, 300, 300, hWindow); XListBox.SetItemTemplateXML(hListBox, "..\\..\\ListBox_Item.xml"); int hAdapter = XAdapterTable.Create(); XListBox.BindAdapter(hListBox, hAdapter); XAdapterTable.AddColumn(hAdapter, "name"); XAdapterTable.AddColumn(hAdapter, "name1"); int nItem = XAdapterTable.AddItemText(hAdapter, "dasemimi"); XAdapterTable.SetItemText(hAdapter, nItem, 1, "xiaosemimi"); nItem = XAdapterTable.AddItemText(hAdapter, "dasemimi1"); XAdapterTable.SetItemText(hAdapter, nItem, 1, "xiaosemimi1"); XEle.RegEventCPP(hListBox, xcConst.XE_LISTBOX_TEMP_CREATE_END, new XE_LISTBOX_TEMP_CREATE_END_CPP(__OnListBoxTemplateCreateEnd)); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }
unsafe public void Create() { xc.XInitXCGUI(""); int hWindow = XWnd.Create(0, 0, 500, 300, "xcgui", 0, 15); int hComboBox = XComboBox.Create(0, 0, 300, 20, hWindow); XComboBox.SetItemTemplateXML(hComboBox, "..//..//ComboBox_ListBox_Item.xml"); int hAdapterTable = XAdapterTable.Create(); XComboBox.BindApapter(hComboBox, hAdapterTable); XAdapterTable.AddColumn(hAdapterTable, "name"); int nItem = XAdapterTable.AddItemText(hAdapterTable, "1.1"); XWnd.ShowWindow(hWindow, 5); xc.XRunXCGUI(); xc.XExitXCGUI(); }