TTreeView does not reduce space to text if no icon image is selected.
Original Reporter info from Mantis: DJS
-
Reporter name:
Original Reporter info from Mantis: DJS
- Reporter name:
Description:
If TTreeView has ImageLists assigned to property "Images" and/or "StateImages" but no images is selected for display (ImageIndex, SelectedIndex, StateIndex set to "-1") the space to the text isn't reduced. Instead an empty space remains.
Steps to reproduce:
- Add a TreeView and two ImageLists to the form
- Set TreeView.Images and TreeView.StateImages to the ImageLists
- Load some images/icons into the ImageLists
- Add an Item to the TreeView (double click on the TreeView on the form)
- Click "New Item"
--> A large empty space to the text is present when no image is selected (eg. ImageIndex/SelectedIndex/StateIndex = -1)
Additional information:
Can easily be resolved by enclosing two subsequent lines in a begin-end block in TreeView.inc of the lcl. See code marked green in the attached image.
Mantis conversion info:
- Mantis ID: 24692
- OS: WIndows 7 x64
- Platform: Windows
- Version: 1.0.10
- Fixed in version: 1.1.99 pre-release
- Fixed in revision: 41956 (#1d1e59dd)