<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../style.css">
<title>
Gambas Documentation - Dialog.Filter
 (gb.qt)</title>
</head>
<table class="none" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left">
<font size="-1">
<a href="../../../../help+en"><img class="flag" alt="Home" border="0" src="../../../../img/lang/en.png" align="center"></a>&nbsp;
<a href="../dialog+en">Up</a>&nbsp;
<a href="color+en">Previous</a>&nbsp;
<a href="font+en">Next</a>&nbsp;
</td></tr></table>
<div class="notab">
<h1>
Dialog.Filter
 (gb.qt)</h1>
<div class="black"><font size="-2"><b>Syntax</b></font></div>
<pre class="syntax"><font color="blue">STATIC</font> <font color="blue">PROPERTY</font> <b>Filter</b> <font color="blue">AS</font> <font color="#0080FF"><a href="../../gb/string[]+en">String[]</a></font></pre>
Returns or sets the filters used by the control for only displaying specific file types.
<p>
This property receives a string array having the following structure:
<p>
<ul>
<li>The first filter.
<li>The first filter description.
<li>The second filter.
<li>The second filter description.
<li>And so on...
<p>
</ul>

A filter string is a list of file patterns with wildcards, separated by a semicolon.
<p>
A filter description can be any string. The filter string is automatically appended to the filter description.
<p>
<div class="gray"><font size="-2"><b>Example</b></font></div>
<pre class="example">Dialog.Title = &quot;Choose a file&quot;
Dialog.Filter = [ &quot;*.png;*.jpg;*.jpeg;*.bmp&quot;, &quot;Picture files&quot;, &quot;*.svg;*.wmf&quot;, &quot;Drawing files&quot; ]
Dialog.Path = &quot;/home/hjh/spiele/sudoku&quot;
IF Dialog.OpenFile() THEN
  RETURN ' User pressed Cancel - does not want to open any file
ENDIF
' User did select a file</pre>

</div>
</body>
</html>

