View Issue Details

IDProjectCategoryView StatusLast Update
0014460LazarusLCLpublic2009-09-04 23:38
ReporterBernhard Assigned ToPaul Ishenin  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.27 (SVN) 
Target Version1.0.0Fixed in Version0.9.29 (SVN) 
Summary0014460: TListView does not reorder icons on resize
DescriptionHi,

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
TagsNo tags attached.
Fixed in Revision21546
LazTarget1.0
WidgetsetWin32/Win64
Attached Files

Activities

2009-08-30 18:20

 

Test.zip (168,094 bytes)

Bernhard

2009-08-30 18:23

reporter   ~0030244

Of course the blanks are ignored by html...

So, what I meant was:

>>>
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_____|
>>>

The _ represents empty space

theo

2009-08-30 20:15

reporter   ~0030248

There are more problems with this for other widget sets.
See:
http://www.lazarus.freepascal.org/index.php/topic,7110.msg33943.html#msg33943

Vincent Snijders

2009-08-31 12:45

manager   ~0030266

LVS_AUTOARRANGE style doesn't seem to be used in windows.

Paul Ishenin

2009-09-03 04:49

manager   ~0030349

Use IconOptions.AutoArrange.

Please test and close if ok.

Bernhard

2009-09-04 23:38

reporter   ~0030427

Works PERFECT now, thank you very much!

Issue History

Date Modified Username Field Change
2009-08-30 18:20 Bernhard New Issue
2009-08-30 18:20 Bernhard File Added: Test.zip
2009-08-30 18:20 Bernhard Widgetset => Win32/Win64
2009-08-30 18:23 Bernhard Note Added: 0030244
2009-08-30 20:15 theo Note Added: 0030248
2009-08-31 12:45 Vincent Snijders Note Added: 0030266
2009-08-31 12:45 Vincent Snijders LazTarget => 1.0
2009-08-31 12:45 Vincent Snijders Status new => acknowledged
2009-08-31 12:45 Vincent Snijders Target Version => 1.0.0
2009-09-03 04:49 Paul Ishenin Fixed in Revision => 21546
2009-09-03 04:49 Paul Ishenin Status acknowledged => resolved
2009-09-03 04:49 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2009-09-03 04:49 Paul Ishenin Resolution open => fixed
2009-09-03 04:49 Paul Ishenin Assigned To => Paul Ishenin
2009-09-03 04:49 Paul Ishenin Note Added: 0030349
2009-09-04 23:38 Bernhard Status resolved => closed
2009-09-04 23:38 Bernhard Note Added: 0030427