godotengine / godotengine/godot
TreeItem.set_custom_as_button doesn't make TreeItem behave as Stylebox
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
Reproducible in 4.3.1.rc
### System information
Windows 10
### Issue description
Custom Button Styles are set in Tree but they take no effect.

Result:

### Steps to reproduce
```
extends Tree
@onready var tree: Tree = $"."
func _ready() -> void:
var child := tree.create_item().create_child()
child.set_cell_mode(0, TreeItem.CELL_MODE_CUSTOM)
child.set_custom_as_button(0, true)
child.set_text(0, "This is text")
```
### Minimal reproduction project (MRP)
[custom_as_button_mrp.zip](https://github.com/user-attachments/files/17582231/custom_as_button_mrp.zip)
two files here with Styles set
Contributor guide
Research direction
Start by running the attached custom_as_button_mrp.zip project and reproducing the behavior with the provided Tree and TreeItem GDScript. Trace the TreeItem custom-cell and style handling to determine why set_custom_as_button has no visible effect; done means the configured custom button styles are applied to the TreeItem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- godot
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100