[doc] misc. patchs & small improvements
[scilab.git] / scilab / modules / gui / help / en_US / findobj.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="findobj">
3     <refnamediv>
4         <refname>findobj</refname>
5         <refpurpose>find an object with specified property</refpurpose>
6     </refnamediv>
7     <refsynopsisdiv>
8         <title>Syntax</title>
9         <synopsis>
10             h =  findobj(propertyName, propertyValue)
11         </synopsis>
12     </refsynopsisdiv>
13     <refsection>
14         <title>Arguments</title>
15         <variablelist>
16             <varlistentry>
17                 <term>propertyName</term>
18                 <listitem>
19                     <para>string character Name of the property to test (case unsensitive).</para>
20                 </listitem>
21             </varlistentry>
22             <varlistentry>
23                 <term>propertyValue</term>
24                 <listitem>
25                     <para>string character specify the value the tested property should be equal to (case sensitive).</para>
26                 </listitem>
27             </varlistentry>
28             <varlistentry>
29                 <term>h</term>
30                 <listitem>
31                     <para>handle of the found object.</para>
32                 </listitem>
33             </varlistentry>
34         </variablelist>
35     </refsection>
36     <refsection>
37         <title>Description</title>
38         <para>
39             This routine is currently used to find objects knowing their 'tag'
40             property.  It returns handle of the first found object which property
41             <emphasis role="italic">propertyName</emphasis> is equal to <emphasis role="italic">propertyValue</emphasis>. If such an object does not exist, the
42             function returns an empty matrix.
43         </para>
44     </refsection>
45     <refsection>
46         <title>Examples</title>
47         <programlisting role="example"><![CDATA[
48 // Create a figure
49 h=figure();
50 // Put a text in the figure
51 uicontrol(h, "style","text", ...
52              "string","This is a figure", ...
53              "position",[50 70 100 100], ...
54              "fontsize",15, ...
55              "tag","Alabel");
56 // Find the object which "tag" value is "Alabel"
57 lab=findobj("tag","Alabel");
58 disp("The text of the label is """+lab.string+"""");
59 // Close the figure
60 close();
61  ]]></programlisting>
62     </refsection>
63     <refsection role="see also">
64         <title>See also</title>
65         <simplelist type="inline">
66             <member>
67                 <link linkend="uicontrol">uicontrol</link>
68             </member>
69             <member>
70                 <link linkend="uimenu">uimenu</link>
71             </member>
72             <member>
73                 <link linkend="set">set</link>
74             </member>
75             <member>
76                 <link linkend="get">get</link>
77             </member>
78         </simplelist>
79     </refsection>
80 </refentry>