- 积分
- 6
- 注册时间
- 2004-4-18
- 仿真币
-
- 最后登录
- 1970-1-1
|
发表于 2011-2-27 21:24:32
|
显示全部楼层
来自 上海
本帖最后由 kalaok 于 2011-2-27 21:26 编辑
帮助里面写的很清楚了
ui_listbox_create( parent, callback, x, y, width, num_rows, label, selection_type, sort )
STRING selection_type “BROWSE”, “EXTEND”, “MULTIPLE”, or “SINGLE”. See selection_type Modes.
Four different selection_type modes exist for the listbox, as follows:
Single Allows only one pick at a time. Here, pressing down on an item will automatically pick it. Any scrolling done afterwards or a releasing of the mouse button on another item will be inconsequential. Arrow keys highlight subsequent items which also selects one at a time.
Browse Allows only one selection to be made at a time. Pressing down on an item only initiates picking, then you may scroll up and down through the other choices without making a selection. As the cursor moves over the items, the item corresponding to the cursor location will become highlighted. Releasing the mouse button on the highlighted item makes the selection. Keyboard selection works the same for browse mode as for single mode.
Multiple Allows picking of more than one item by clicking each one separately. It will also toggle off previously highlighted items. The arrow keys highlight the items while the space bar selects and deselects them.
Extend Also permits multiple picking of items. Pressing down on the left mouse button with the cursor on the first (base) item desired will initiate picking. Next, dragging through any adjacent items will highlight them also. These highlights are temporary and can be changed by dragging elsewhere in the listbox. Releasing the mouse button on another item will pick all items between the base and last item inclusively.
也就是说selection_type应该选SINGLE |
|