View Issue Details

IDProjectCategoryView StatusLast Update
0024692LazarusLCLpublic2013-10-13 18:46
ReporterDJSAssigned ToMattias Gaertner 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSWIndows 7 x64OS Version
Product Version1.0.10Product Build 
Target VersionFixed in Version1.1.99 pre-release 
Summary0024692: TTreeView does not reduce space to text if no icon image is selected.
DescriptionIf 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 InformationCan 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.
TagsNo tags attached.
Fixed in Revision41956
LazTarget-
Widgetset
Attached Files

Activities

DJS

2013-07-01 02:17

reporter  

treeview_fixed.png (55,159 bytes)
treeview_fixed.png (55,159 bytes)

DJS

2013-09-27 11:38

reporter   ~0070379

In revision 42478 this is still not fixed, despite being marked as "fixed in revision 41956".

Mattias Gaertner

2013-09-27 12:48

manager   ~0070382

You can see the difference for example in the IDE "Messages" window.

Please provide a complete example.

DJS

2013-10-12 23:20

reporter   ~0070774

I just did a fresh install of the current revision 42478 to a Windows 7 x64 system.
I opened "\lazarus\lcl\include\treeview.inc" with lazarus and scrolled to line no. 4878.
There's no change to the code, as I suggested in the attached image of my original bug report. It's still the old code.
I also reopened one of my projects, rebuilt and recompiled it and theres also no change. It still displays the gap. So both the source code and the precompiled units were not fixed.

Mattias Gaertner

2013-10-12 23:30

manager  

msg.png (9,444 bytes)
msg.png (9,444 bytes)

Mattias Gaertner

2013-10-12 23:33

manager   ~0070775

The new feature is in 1.1 and above, not in 1.0.x.

Maybe we are talking about different things. I uploaded a screenshot of the IDE messages window. You can see the difference between with and without icon.

DJS

2013-10-13 00:08

reporter   ~0070777

OK, I just tried the 1.1.99pre-release revision 42829 and I can confirm the changes there. Are there no bugfixes applied to 1.0.x versions?

This is confusing, because I was referring to "Product Version 1.0.10" in the bug report and the issue history only says "Fixed in revision 41956" but not which version. I assumed the 1.0.x branch since its version and revision number was also updated over time.

Mattias Gaertner

2013-10-13 09:38

manager   ~0070780

It breaks custom draw code and therefore will not be applied to 1.0.x.

Mattias Gaertner

2013-10-13 09:39

manager   ~0070781

I set the Fixed version.

DJS

2013-10-13 18:46

reporter   ~0070796

Oh, I see.
Thanks.

Issue History

Date Modified Username Field Change
2013-07-01 02:17 DJS New Issue
2013-07-01 02:17 DJS File Added: treeview_fixed.png
2013-07-01 14:38 Jonas Maebe Project FPC => Lazarus
2013-07-01 15:24 Mattias Gaertner Fixed in Revision => 41956
2013-07-01 15:24 Mattias Gaertner LazTarget => -
2013-07-01 15:24 Mattias Gaertner Status new => resolved
2013-07-01 15:24 Mattias Gaertner Resolution open => fixed
2013-07-01 15:24 Mattias Gaertner Assigned To => Mattias Gaertner
2013-09-27 11:38 DJS Note Added: 0070379
2013-09-27 12:48 Mattias Gaertner Note Added: 0070382
2013-10-12 23:20 DJS Note Added: 0070774
2013-10-12 23:30 Mattias Gaertner File Added: msg.png
2013-10-12 23:33 Mattias Gaertner Note Added: 0070775
2013-10-13 00:08 DJS Note Added: 0070777
2013-10-13 09:38 Mattias Gaertner Note Added: 0070780
2013-10-13 09:39 Mattias Gaertner Fixed in Version => 1.1.99 pre-release
2013-10-13 09:39 Mattias Gaertner Note Added: 0070781
2013-10-13 18:46 DJS Note Added: 0070796