hkb_editor.gui.dialogs.edit_simple_array_dialog
¶
edit_simple_array_dialog
¶
Bases: DpgItem
A table editor for a list of same-shaped tuples.
Rows can be added, removed and reordered, and every cell gets an input
widget matching its column type. The on_* hooks may veto a change by
raising.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
items
|
list of tuple
|
The list to edit; mutated in place. |
required |
columns
|
dict
|
Maps column name to the type of its value. |
required |
title
|
str
|
Window title bar label. |
'Edit Array'
|
help
|
str
|
Explanation shown at the bottom of the dialog. |
None
|
choices
|
dict
|
Maps column index to a list of choices for that column. |
None
|
on_add
|
callable
|
|
None
|
on_update
|
callable
|
|
None
|
on_delete
|
callable
|
|
None
|
on_move
|
callable
|
|
None
|
on_close
|
callable
|
Called as |
None
|
get_item_hint
|
callable
|
Enables a per-row '(?)' button. Not implemented yet. |
None
|
item_limit
|
int
|
Max rows to render; derived from the column count if omitted. |
None
|
tag
|
int or str
|
Explicit tag; auto-generated if 0. |
0
|
user_data
|
any
|
Passed through to |
None
|
fill_table
¶
fill_table(
sender: str = None,
filt: str = None,
user_data: Any = None,
) -> None
Rebuild the table from the current items and filter.