Recent

Author Topic: ShellListView Bug ?  (Read 948 times)

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
ShellListView Bug ?
« on: June 24, 2025, 02:26:21 pm »
Hi,
I am new on FORUMS ...
This is the right place for my post ?

The Refresh on a TshellListView does n't work.
Here is that i have to do for making a refresh :

 TRASH_FILES.Enabled:=false;
 TRASH_FILES.Root:='../';
 TRASH_FILES.Enabled:=true;

 TRASH_FILES.Enabled:=false;
 TRASH_FILES.Root:= extractfilepath(Paramstr(0))+'TRASH';
 TRASH_FILES.Enabled:=true;

 TRASH_FILES.Refresh;

Have a nice day.

Bart

  • Hero Member
  • *****
  • Posts: 5575
    • Bart en Mariska's Webstek
Re: ShellListView Bug ?
« Reply #1 on: June 24, 2025, 06:32:33 pm »
Maybe you are looking for UpdateView method?

Bart

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
Re: ShellListView Bug ?
« Reply #2 on: June 25, 2025, 07:45:26 am »
Hi,
Sorry, Update dont work too.
I have not look for TshellListView code... i am not a hero ;)

There is an other problem.
When i try to remove the TShellListView, Lazarus crash. (idem for a TShellTreeview)
I have to remove the Object def from the frm file if i want  to remove it from the form.

Thank's for your answer.
 

wp

  • Hero Member
  • *****
  • Posts: 12927
Re: ShellListView Bug ?
« Reply #3 on: June 25, 2025, 12:03:32 pm »
It would be helpful if you'd give more details on what you are doing exactly, and in particular, in which context you are doing it. And "dont work" is not a good description of an error in most cases. What do you expect? And what is happening?

Why do you need to "refresh" the listview? The attached demo illustrates that it is just sufficient to set the Root property to another folder name to get the contents of this folder in the display - no Refresh needed.

I also cannot reproduce that Lazarus crashes when I delete a TShellListView in the form designer (by pressing the DELETE key), even when it is linked to a TShellTreeView.
« Last Edit: June 25, 2025, 12:05:51 pm by wp »

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
Re: ShellListView Bug ?
« Reply #4 on: June 25, 2025, 02:17:54 pm »
Ok,
I am using Linux.
I start Lazarus IDE v2.2.6 (gtk2) with fpc 3.2.2
I create an aplication project.
I put a simple shellListView on Form1 (without link on ShellTreeView).
I run it and all is ok.
After, if i want to cut or delete this shellListView Lazarus freeze.
I wait and i have « force to quit » message.
I quit and Lazarus closed.
Same problème with shellTreeview.
To solve it, i have to remove Object on unit1.frm.
I have the same problème with IDE PILOTLogic or with fpcDELUXE.
So i am sure the problème dont come  from my application ;)
I have downloaded your sample (Thank’s for it ).
When i try to remove your ShellTreeView Lazarus freeze too.
So, if all is ok for you, i think the problem is about the OS use ;).

what do think about ?

PS : Sorry for my English :)

wp

  • Hero Member
  • *****
  • Posts: 12927
Re: ShellListView Bug ?
« Reply #5 on: June 25, 2025, 05:52:52 pm »
I have a VM with Ubuntu and a Laz 2.2.6 - the IDE crashed when I deleted the ShellListView from the form. On this VM there is also a Laz/main, and it did not show the crash on the same operation.

Therefore, I'd recommend that you upgrade your Lazarus version. (We have v4.0 now...)

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
Re: ShellListView Bug ?
« Reply #6 on: June 26, 2025, 10:37:06 am »
Hello,
On my linux Mint i have install a VM with the last linux Mint Cinamon and the last version 4.0.0.
All is ok.

Thank's very much.

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
Re: ShellListView Bug ?
« Reply #7 on: June 26, 2025, 10:43:59 am »
Oupsss,
Refresh, Update or invalidate are not ok :(
Sorry.

etrusco

  • New Member
  • *
  • Posts: 17
Re: ShellListView Bug ?
« Reply #8 on: June 30, 2025, 09:59:53 pm »
I guess you`re trying to re-read the list of files from the filesystem, so the method you want is UpdateView.

Michel_GONZALEZ

  • New member
  • *
  • Posts: 7
Re: ShellListView Bug ?
« Reply #9 on: July 01, 2025, 12:20:41 pm »
Hello,
UpdateView is OK on 4.0.0 version.
Cool !
Thank's very much

 

TinyPortal © 2005-2018