Skip to content

Conversation

@DexterFstone
Copy link
Contributor

@DexterFstone DexterFstone commented Dec 24, 2025

Description:

This PR adds cell/button visibility control to the TreeItem, allowing for hiding or showing individual cell contents without affecting the overall tree layout. This PR will help implement something like #10911 in the future.

Methods:

TreeItem.set_cell_visible(column: int, visible: bool) -> void:
TreeItem.is_cell_visible(column: int) -> bool:
TreeItem.set_button_visible(column: int, button_index: int, visible: bool) -> void:
TreeItem.is_button_visible(column: int, button_index: int) -> bool:

Signal:

Tree.item_hovered(item: TreeItem, column: int)

The signal is the main part of implementing the cell visibility change, for example, hovering over a cell shows the button, etc.

@DexterFstone DexterFstone requested review from a team as code owners December 24, 2025 14:50
@DexterFstone DexterFstone force-pushed the Add-cell-visibility-control-to-Tree branch from c5ad909 to 371ed96 Compare December 24, 2025 14:54
@KoBeWi
Copy link
Member

KoBeWi commented Dec 24, 2025

How does it help the mentioned proposal if all buttons are inside a single cell?

@KoBeWi KoBeWi added this to the 4.x milestone Dec 24, 2025
@DexterFstone DexterFstone force-pushed the Add-cell-visibility-control-to-Tree branch from 371ed96 to c70c779 Compare December 25, 2025 06:07
@DexterFstone
Copy link
Contributor Author

How does it help the mentioned proposal if all buttons are inside a single cell?

I updated the code; now it is possible to hide the specific index of the button using set_button_visible.

@DexterFstone DexterFstone changed the title Add cell visibility control to Tree Add cell/button visibility control to TreeItem Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants