Recent

Author Topic: TOpenDialog filter not working  (Read 577 times)

Middlecope

  • Jr. Member
  • **
  • Posts: 90
TOpenDialog filter not working
« on: February 12, 2024, 02:21:42 pm »
Lazarus 2.2.4
FPC 3,2.2
OpenSUSE
I set the filter property in the component to .dot. It did not filter
I also tried out .csv the same result
Some time ago it worked and now it is broken?
Thanks for your attention

jamie

  • Hero Member
  • *****
  • Posts: 6032
Re: TOpenDialog filter not working
« Reply #1 on: February 12, 2024, 03:30:57 pm »
Did u try *.dot ?
The only true wisdom is knowing you know nothing

Middlecope

  • Jr. Member
  • **
  • Posts: 90
Re: TOpenDialog filter not working
« Reply #2 on: February 12, 2024, 07:27:32 pm »
In the hint section at the bottom  I read that it is a string 
I tried many things     *.dot   -   .dot   - '.dot'   - dot
None of them worked

cdbc

  • Hero Member
  • *****
  • Posts: 970
    • http://www.cdbc.dk
Re: TOpenDialog filter not working
« Reply #3 on: February 12, 2024, 07:35:02 pm »
Hi
How about:
Code: Pascal  [Select][+][-]
  1. ...
  2. dlg.Filter:= 'Dot files(*.dot)|*.dot;All files(*.*)|*.*';
  3.  
From the top of my head, totally untested...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

Middlecope

  • Jr. Member
  • **
  • Posts: 90
Re: TOpenDialog filter not working
« Reply #4 on: February 12, 2024, 08:12:35 pm »
Yes thank you
I changed the Filter at run time and it worked
I changed it at design time and it worked
Maye the vertical bar was essential

PascalDragon

  • Hero Member
  • *****
  • Posts: 5428
  • Compiler Developer
Re: TOpenDialog filter not working
« Reply #5 on: February 12, 2024, 08:43:20 pm »
Maye the vertical bar was essential

Yes, it is. It separates the description text and the list of real extensions the filter applies to.

 

TinyPortal © 2005-2018