Difference between revisions of "Talk:CudaText API"
From Free Pascal wiki
Jump to navigationJump to searchLine 14: | Line 14: | ||
* LISTBOX_GET_COUNT: Gets number if items. | * LISTBOX_GET_COUNT: Gets number if items. | ||
* LISTBOX_ADD: Adds item (str) with associated tag (int). Param index: at which index to add, -1 to append. | * LISTBOX_ADD: Adds item (str) with associated tag (int). Param index: at which index to add, -1 to append. | ||
− | * LISTBOX_DELETE: Deletes item | + | * LISTBOX_DELETE: Deletes item with given index. |
* LISTBOX_DELETE_ALL: Deletes all items. | * LISTBOX_DELETE_ALL: Deletes all items. | ||
* LISTBOX_GET_ITEM: Gets item with given index as 2-tuple (text, tag). Gets None if index incorrect. | * LISTBOX_GET_ITEM: Gets item with given index as 2-tuple (text, tag). Gets None if index incorrect. | ||
Line 22: | Line 22: | ||
* LISTBOX_GET_TOP: Gets index of top visible item. | * LISTBOX_GET_TOP: Gets index of top visible item. | ||
* LISTBOX_SET_TOP: Sets index of top visible item. | * LISTBOX_SET_TOP: Sets index of top visible item. | ||
− | |||
− |
Revision as of 22:07, 4 November 2016
todo
listbox_proc
listbox_proc(id_listbox, id_action, index=0, text="", tag=0)
Perform action on listbox UI-control.
- Param id_listbox: int handle of listbox.
- Param index: index of item (0-base).
Possible values of id_action:
- LISTBOX_GET_COUNT: Gets number if items.
- LISTBOX_ADD: Adds item (str) with associated tag (int). Param index: at which index to add, -1 to append.
- LISTBOX_DELETE: Deletes item with given index.
- LISTBOX_DELETE_ALL: Deletes all items.
- LISTBOX_GET_ITEM: Gets item with given index as 2-tuple (text, tag). Gets None if index incorrect.
- LISTBOX_SET_ITEM: Sets item with given index, to given text and tag.
- LISTBOX_GET_SEL: Gets selected index. -1 for none.
- LISTBOX_SET_SEL: Sets selected index. -1 for none.
- LISTBOX_GET_TOP: Gets index of top visible item.
- LISTBOX_SET_TOP: Sets index of top visible item.