TListView does not reorder icons on resize
Original Reporter info from Mantis: bstreit
-
Reporter name: Bernhard
Original Reporter info from Mantis: bstreit
- Reporter name: Bernhard
Description:
Hi,
I'm not 100% sure if this is a bug, but I assume.
The problem is that the TListView does not re-arrange its icons if the listview is resized, e.g. when anchored to all sides and the forms size is changed.
For example, imagine you have a Listview with ViewStyle set to vsIcon, and you make it narrow, and add nine elements, it might look like that:
|xxx|
|xxx|
|xxx|
Now anchor the listview to all sides so that it will be resized whenever the form itself is resized, run the program and maximize the form. Then the listview will look like that after:
|xxx |
|xxx |
|xxx |
but I would expect it to rearrange the icons like that:
|xxxxxxxx|
|x |
I finally achieved it by putting this code:
procedure TForm1.FormChangeBounds(Sender: TObject);
begin
ListView1.ViewStyle:=vsSmallIcon;
ListView1.ViewStyle:=vsIcon;
end;
but I don't find it that nice...
Bernhard
Mantis conversion info:
- Mantis ID: 14460
- Version: 0.9.27 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 21546 (#4a0461a5)
- Target version: 1.0.0
- LazTarget: 1.0