ShellListView1.Mask - any trick to get around case sensitivity?? lazarus / 31-LCL ---------------------------------------------------------------------- winni · 2021-10-31 13:11 Hi! Just detected that ShellListView1.Mask is case sensitive. This leads to such constructs: Mask = '*.JPG;*.jpg;*.JPEG;*.jpeg;*.PNG;*.png;*.TIF;*.tif;*.TIFF;*.tiff;'+             '*.BMP;*.bmp;*.ICO;*.ico;*.WEBP;*.webp;*.GIF;*.gif'; But it will fail if an suffix is witten mixed like '*.Jpg' And there are 8 ways to mix upper an lower case for 'JPG'. Is there a trick to get around the case sensivity? Winni ---------------------------------------------------------------------- jamie · 2021-10-31 13:26 ShellListView1.MasCaseSensitivity := mcsCaseInsensitive; Maybe that will work ? ---------------------------------------------------------------------- winni · 2021-10-31 13:46 Quote from: jamie on October 31, 2021, 02:26:40 pmShellListView1.MasCaseSensitivity := mcsCaseInsensitive; Maybe that will work ? MasCaseSensitivity and mcsCaseInsensitive - both do not exist . ---------------------------------------------------------------------- jamie · 2021-10-31 13:54 They do in the trunk its looks like the OnAdditem event is using CONST's in the defines which one could correct the case of the extension otherwise.  it's hard to foresee all possible needs when making such features. Maybe that could be changed without causing mush issues since I don't think at this time that event is getting a lot of use. ---------------------------------------------------------------------- Bart · 2021-10-31 15:02 Quote from: jamie on October 31, 2021, 02:54:44 pmThey do in the trunk. And they will be in 2.2. IIRC then the TShell* components used FindFirst/FindNext and not Masks unit to find files. On *nix that means it will be case senistive. Hopefully 2.2 will be there soon. Bart ---------------------------------------------------------------------- winni · 2021-10-31 15:54 Quote from: jamie on October 31, 2021, 02:54:44 pm  it's hard to foresee all possible needs when making such features. Yes very hard. Just have a look at your "Downloads" directory ....... ---------------------------------------------------------------------- winni · 2021-11-02 09:33 Hi! Do it yourself: CameCaseMask Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i const FileMask = '*.JPG;*.JPEG;*.PNG;*.TIF;*.TIFF;*.BMP;*.ICO;*.WEBP;*.GIF';  ....function CamelCaseMask (Mask : string) : string;var p,q : integer;    suffix : string;                   function upper (c: char) : char ;                  begin                     if ord (c) in [97..122] then result := chr(ord(c)-32) else result := c;                end;                   function lower (c: char) : char;                begin                     if ord (c) in [65..90] then result := chr(ord(c)+32) else result := c;                  end;                 procedure updown(var s: string;start,max : integer);                var b : boolean;                   begin                  for b := false to true do                    begin                      if b then s[start] := Upper(s[start]) else s[start] := lower(s[start]);                  if start= max then result := result+'*.'+s+';' else                                                      upDown(s,start+1,max);                    end;                  end; beginmask := LowerCase(mask);result := '';repeatp := pos (';',mask);if p > 0 then suffix := copy (mask,1,p-1) else suffix := mask;delete (mask,1,p);if pos('*.',suffix) = 1 then delete (suffix,1,2);upDown(suffix,1,length(suffix));until p =0;if result[length(result)]=';' then delete (result,length(result),1);end; .....ShellListView1.Mask := CamelCaseMask(FileMask);   Winni