예제 #1
0
파일: listBox.go 프로젝트: CodyGuo/xcgui
func OnBtnClickAdd(pbHandled *bool) int {
	hAdapter := xcgui.XListBox_GetAdapter(hListBox)
	xcgui.XAdapterTable_InsertItemText(hAdapter, xcgui.XAdapterTable_GetCount(hAdapter), "test - insert"+fmt.Sprint(xcgui.XAdapterTable_GetCount(hAdapter)))
	xcgui.XEle_RedrawEle(hListBox)

	return 0
}
예제 #2
0
파일: listBox.go 프로젝트: CodyGuo/xcgui
func OnBtnClickDelEx(pbHandled *bool) int {
	hAdapter := xcgui.XListBox_GetAdapter(hListBox)
	ok := xcgui.XAdapterTable_DeleteItemEx(hAdapter, 1, 3)
	if ok {
		xcgui.XEle_RedrawEle(hListBox)
	}

	return 0
}
예제 #3
0
func OnBtnClick(hEventEle xcgui.HELE, pbHandled *bool) int {
	if hButtonAdd == hEventEle {
		xcgui.XProgBar_SetPos(hProgressBar, xcgui.XProgBar_GetPos(hProgressBar)+1)
	} else {
		xcgui.XProgBar_SetPos(hProgressBar, xcgui.XProgBar_GetPos(hProgressBar)-1)
	}
	xcgui.XEle_RedrawEle(hProgressBar)

	return 0
}
예제 #4
0
파일: listBox.go 프로젝트: CodyGuo/xcgui
func OnBtnClickDel(pbHandled *bool) int {
	hAdapter := xcgui.XListBox_GetAdapter(hListBox)
	array := make([]uint16, 256)
	count := xcgui.XListBox_GetSelectAll(hListBox, &array[0], 256)
	for i := 0; i < count*2; i += 2 {
		ok := xcgui.XAdapterTable_DeleteItem(hAdapter, int(array[i]))
		if ok {
			xcgui.XEle_RedrawEle(hListBox)
		}
	}

	return 0
}