Method: Fox::FXFileSelector#setPatternList
- Defined in:
- rdoc-sources/FXFileSelector.rb
#setPatternList(patterns) ⇒ Object
Change the list of file patterns shown in the file selector. The patterns argument is an array of strings, and each string represents a different file pattern. A pattern consists of an optional name, followed by a pattern in parentheses. For example, this code:
patterns = [ "*", "*.cpp,*.cc", "*.hpp,*.hh,*.h" ]
aFileSelector.setPatternList(patterns)
and this code:
patterns = [ "All Files (*)", "C++ Sources (*.cpp,*.cc)", "C++ Headers (*.hpp,*.hh,*.h)" ]
aFileSelector.setPatternList(patterns)
will both set the same three patterns, but the former shows no pattern names.
For compatibility with the FOX C++ library API of the same name, #setPatternList also accepts a patterns value that is a single string, with each pattern separated by newline characters, e.g.
patterns = "All Files (*)\nC++ Sources (*.cpp,*.cc)\nC++ Headers (*.hpp,*.hh,*.h)"
aFileSelector.setPatternList(patterns)
114 |
# File 'rdoc-sources/FXFileSelector.rb', line 114 def setPatternList(patterns); end |