Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5f5d88c6b2988e78ee210e72f14d11ca > files > 810

python-card-0.8.1-9mdv2010.0.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
                       
  <meta http-equiv="content-type"
 content="text/html; charset=ISO-8859-1">
                       
  <meta name="author" content="Dan Shafer">
  <title>Find Dialog</title>
   
<meta name="generator" content="Namo WebEditor v5.0(Trial)">
</head>
  <body>
           
<h1>Find Dialog</h1>
      <img src="images/dialogsfig4.png" alt="Find Dialog Sample"
 width="370" height="120">
        <br>
      <br>
           
<h2>Creating the Dialog</h2>
      Create a Find Dialog by calling dialog.findDialog with the one required 
and any or all of the three optional arguments shown in the table below:
<p><br>
      <b>Example:<br>
      <br>
      </b>Above dialog was created with this line of code:<br>
      <br>
      <code>result = dialog.findDialog(self)<br>
      </code><br>
             
</p>
<table border="1" width="80%">
    <tr>
        <td>
            <p><b>Argument</b></p>
        </td>
        <td>
            <p><b>Data type/Notes</b></p>
        </td>
    </tr>
    <tr>
        <td>
            <p>self</p>
        </td>
        <td>the window (background) that is the parent 
 for   the  dialog
        </td>
    </tr>
    <tr>
        <td>
            <p>OPTIONAL searchText</p>
        </td>
        <td>
            <p>String defining the text for which to search</p>
        </td>
    </tr>
    <tr>
        <td>
            <p>OPTIONAL wholeWordsOnly</p>
        </td>
        <td>
            <p>Boolean value indicating whether to confine the search to strings 
            that contain the search text as a whole word rather than a substring. 
            True = search for whole words only; False = find all occurrences of the 
            search text</p>
        </td>
    </tr>
    <tr>
        <td>
            <p>OPTIONAL caseSensitive</p>
        </td>
        <td>
            <p>Boolean value indicating whether to confine the search to strings 
            that contain the search text exactly as provided including upper 
            and lower case letter sensitivity.. True = search for exact capitalization 
            match; False = find all occurrences of the search text</p>
        </td>
    </tr>
</table>
<h2>Interacting With the Dialog</h2>
      The findDialog component returns four values, stored as elements  of
 the Python dictionary called &quot;results&quot; returned by all PythonCard dialogs.
  These results are as shown in the following table.<br>
      <br>
           
<table cellpadding="2" cellspacing="2" border="1" width="50%">
        <tbody>
          <tr>
            <td valign="top"><b>Name of value</b><br>
              </td>
            <td valign="top"><b>Description</b><br>
            </td>
          </tr>
          <tr>
            <td valign="top">accepted<br>
            </td>
            <td valign="top">True = user clicked OK<br>
        False = user clicked Cancel<br>
            </td>
          </tr>
          <tr>
            <td valign="top">searchText<br>
            </td>
            <td valign="top">String containing the text entered by the user 
 for which the search is to be conducted<br>
              </td>
          </tr>
       <tr>
         <td valign="top">wholeWordsOnly<br>
         </td>
         <td valign="top">True = user checked &quot;Whole Words Only&quot; checkbox<br>
   False = user did not check the checkbox<br>
         </td>
       </tr>
       <tr>
         <td valign="top">caseSensitive<br>
         </td>
         <td valign="top">True = user checked &quot;Case Sensitive&quot; checkbox<br>
   False = user did not check the checkbox<br>
         </td>
       </tr>
                       
  </tbody>      
</table>
      <br>
     <b>Example:<br>
     <br>
     </b>The sample dialog shown at the top of this page returns the following
 results:<br>
      <b><br>
     </b>accepted: True<br>
   searchText: PythonCard<br>
   wholeWordsOnly: True<br>
   caseSensitive: False<br>
   <br>
     <br>
     <br>
      &nbsp; <br>
      <br>
       <br>
         <br>
  <br>
 
</body>
</html>