hkb_editor.gui.widgets.editable_table
¶
add_filepaths_table
¶
Bases: DpgItem
A file/folder path list widget built on add_widget_table.
Provides an add-files (or add-folders) button that opens a native dialog. Each path is shown as a read-only shortened text field.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_paths
|
list of Path
|
Paths to pre-populate the table with. |
required |
on_value_changed
|
callable
|
Fired as |
None
|
folders
|
bool
|
Use folder-picker dialog instead of file-picker. |
False
|
label
|
str
|
Text label rendered above the table. |
'Files'
|
filetypes
|
dict
|
Passed to |
None
|
on_select
|
callable
|
Fired as |
None
|
show_clear
|
bool
|
Show a clear-all button. |
False
|
parent
|
int or str
|
DPG parent item. |
0
|
tag
|
int or str
|
Explicit tag; auto-generated if 0. |
0
|
user_data
|
any
|
Passed through to callbacks. |
None
|
add_widget_table
¶
Bases: DpgItem
A generic editable table widget for Dear PyGui.
Renders a list of items as table rows via a caller-supplied create_row
function. Optionally supports adding, removing, selecting, and clearing
items. If new_item is not set, add/remove controls are hidden.
Row selection is implemented with a narrow dedicated button column rather than a span_columns selectable, so the remove button remains clickable.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_values
|
list
|
Items to populate the table with on construction. |
required |
create_row
|
callable
|
Called as |
required |
new_item
|
callable
|
Called as |
None
|
on_add
|
callable
|
Fired as |
None
|
on_remove
|
callable
|
Fired as |
None
|
on_select
|
callable
|
Fired as |
None
|
header_row
|
bool
|
Show column headers. |
False
|
columns
|
list of str
|
Column header labels. |
('Value',)
|
label
|
str
|
Text label rendered above the table. |
None
|
add_item_label
|
str
|
Label for the add button. |
'+'
|
show_clear
|
bool
|
Show a clear-all button next to the add button. |
False
|
parent
|
int or str
|
DPG parent item. |
0
|
tag
|
int or str
|
Explicit tag; auto-generated if 0 or None. |
0
|
user_data
|
any
|
Passed through to all callbacks. |
None
|