<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hello James<br>
    <br>
    <tt>'Position',[0.05625,0.0541667,0.7921875,0.8729167]</tt><br>
    seems to be normalized values. So don't forget to set units
    property.<br>
    <br>
    <tt>//figure<br>
      f=figure(...</tt><tt><br>
    </tt><tt>    'figure_position', [400,50], ...</tt><tt><br>
    </tt><tt>    'figure_size', [859,752], ...</tt><tt><br>
    </tt><tt>    'auto_resize', 'on', ...</tt><tt><br>
    </tt><tt>    'background', 33, ...</tt><tt><br>
    </tt><tt>    'figure_name', 'VISA Interface number %d',...</tt><tt><br>
    </tt><tt>    'dockable', 'off', ...</tt><tt><br>
    </tt><tt>    'infobar_visible', 'off', ...</tt><tt><br>
    </tt><tt>    'toolbar_visible', 'off', ...</tt><tt><br>
    </tt><tt>    'menubar_visible', 'on', ...</tt><tt><br>
    </tt><tt>    'default_axes', 'on', ...</tt><tt><br>
    </tt><tt>    'visible', 'off');</tt><tt><br>
    </tt><tt><br>
    </tt><tt>handles.dummy = 0;</tt><tt><br>
    </tt><tt><br>
      //tab container<br>
    </tt><tt>handles.tabframe = uicontrol(f, ...</tt><tt><br>
    </tt><tt>    'style', 'tab', ...</tt><tt><br>
    </tt><tt>    'position', [0.05625,0.0541667,0.7921875,0.8729167]</tt><tt>);</tt><tt><br>
    </tt><tt><br>
      //set "units" property<br>
    </tt><tt>handles.tabframe.units = "normalized";</tt><tt><br>
    </tt><tt>    <br>
      //3rd tab<br>
    </tt><tt></tt><tt>handles.tab3 = uicontrol(handles.tabframe, ...</tt><tt><br>
    </tt><tt>    "style", "frame", ...</tt><tt><br>
    </tt><tt>    "backgroundcolor", [1 0 1], ...</tt><tt><br>
    </tt><tt>    "string", "magenta")</tt><tt><br>
    </tt><tt>    <br>
      //2nd tab<br>
    </tt><tt></tt><tt>handles.tab2 = uicontrol(handles.tabframe, ...</tt><tt><br>
    </tt><tt>    "style", "frame", ...</tt><tt><br>
    </tt><tt>    "backgroundcolor", [1 1 0], ...</tt><tt><br>
    </tt><tt>    "string", "yellow")</tt><tt><br>
    </tt><tt>    <br>
      //1st tab<br>
    </tt><tt></tt><tt>handles.tab1 = uicontrol(handles.tabframe, ...</tt><tt><br>
    </tt><tt>    "style", "frame", ...</tt><tt><br>
    </tt><tt>    "backgroundcolor", [0 1 1], ...</tt><tt><br>
    </tt><tt>    "string", "cyan")</tt><tt><br>
    </tt><tt>    <br>
      //show figure<br>
    </tt><tt></tt><tt>f.visible = 'on';</tt><tt><br>
    </tt><br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">Le 26/02/2018 à 16:26, Stéphane
      Mottelet a écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:296c84f1-5b1e-fa4f-7537-2753d98cc497@utc.fr">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div class="moz-cite-prefix">Le 26/02/2018 à 16:20, James Holland
        a écrit :<br>
      </div>
      <blockquote type="cite"
        cite="mid:1519658440146-0.post@n3.nabble.com">
        <pre wrap="">I'm trying to incorporate the 'tab' function in a GUI but I don't see any tab
control when I execute the code. I can't find a tutorial for this either.
can someone please give me an example of how this is done. My code is below:

<code>
f=figure('figure_position',[400,50],'figure_size',[859,752],'auto_resize','on','background',[33],'figure_name','VISA
Interface number %d',...
'dockable','off','infobar_visible','off','toolbar_visible','off','menubar_visible','on','default_axes','on','visible','off');
//////////
handles.dummy = 0;

handles.tabframe = uicontrol
(f,'Style','tab','Position',[0.05625,0.0541667,0.7921875,0.8729167],'Visible','on','String','tab1');
</code>

I also have button controls but they work OK.

TIA James



--
Sent from: <a class="moz-txt-link-freetext" href="http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html" moz-do-not-send="true">http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html</a>
_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org" moz-do-not-send="true">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users" moz-do-not-send="true">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <p>Hello,</p>
      <p>there is an example in the tests of gui module :</p>
      <table style="border-collapse: collapse; border-spacing: 0px; font-size: 12px; margin-bottom: 0px; color: rgb(51, 51, 51); font-family: monospace; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: pre; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;" cellspacing="0" cellpadding="0"><tbody><tr><td style="margin: 0px; padding: 0.5em; border: none;" valign="top" width="33"><div style="margin: 0px 5px 0px 0px; padding: 0px 5px; border: 1px dashed gray; text-align: right; font-family: monospace;">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
</div></td><td style="margin: 0px; padding: 0.5em; border: none;" valign="top"><pre style="margin: 0px; padding: 0px; font-family: monospace; line-height: 15px;"><span style="color: rgb(128, 128, 128);">// Scilab ( <a class="moz-txt-link-freetext" href="http://www.scilab.org/" moz-do-not-send="true">http://www.scilab.org/</a> ) - This file is part of Scilab</span>
<span style="color: rgb(128, 128, 128);">// Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS </span>
<span style="color: rgb(128, 128, 128);">// </span>
<span style="color: rgb(128, 128, 128);">// This file must be used under the terms of the CeCILL.</span>
<span style="color: rgb(128, 128, 128);">// This source file is licensed as described in the file COPYING, which</span>
<span style="color: rgb(128, 128, 128);">// you should have received as part of this distribution.  The terms</span>
<span style="color: rgb(128, 128, 128);">// are also available at    </span>
<span style="color: rgb(128, 128, 128);">// <a class="moz-txt-link-freetext" href="http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt" moz-do-not-send="true">http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt</a></span>
 
<span style="color: rgb(176, 24, 19); font-weight: bold;">function</span> tabs <span>=</span> createTab<span class="br0">(</span>uiType<span class="br0">)</span>
    f <span>=</span> <span style="color: rgb(174, 92, 176); font-weight: bold;">figure</span><span class="br0">(</span><span style="color: rgb(255, 0, 0);">"dockable"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"off"</span> <span>,</span><span style="color: rgb(255, 0, 0);">"infobar_visible"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"off"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"toolbar_visible"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"off"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"menubar_visible"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"off"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"default_axes"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"off"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"layout"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"border"</span><span class="br0">)</span>
    f.<span style="color: rgb(51, 153, 51);">axes_size</span> <span>=</span> <span class="br0">[</span><span style="color: rgb(204, 102, 204);">470</span><span>,</span> <span style="color: rgb(204, 102, 204);">410</span><span class="br0">]</span><span>;</span>
 
    tabs <span>=</span> <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>f<span>,</span> <span style="color: rgb(255, 0, 0);">"style"</span><span>,</span> uiType<span>,</span> <span style="color: rgb(255, 0, 0);">"tag"</span> <span>,</span><span style="color: rgb(255, 0, 0);">"tab"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"constraints"</span><span>,</span> createConstraints<span class="br0">(</span><span style="color: rgb(255, 0, 0);">"border"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"center"</span><span class="br0">)</span><span class="br0">)</span><span>;</span>
 
    tab1 <span>=</span> <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tabs<span>,</span> <span style="color: rgb(255, 0, 0);">"style"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"frame"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tag"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 1"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 1"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"layout"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"border"</span><span class="br0">)</span><span>;</span>
    <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tab1<span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"button 1"</span><span class="br0">)</span><span>;</span>
 
    tab2 <span>=</span> <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tabs<span>,</span> <span style="color: rgb(255, 0, 0);">"style"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"frame"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tag"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 2"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 2"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"layout"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"border"</span><span class="br0">)</span><span>;</span>
    <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tab2<span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"button 2"</span><span class="br0">)</span><span>;</span>
 
    tab3 <span>=</span> <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tabs<span>,</span> <span style="color: rgb(255, 0, 0);">"style"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"frame"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tag"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 3"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"tab 3"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"layout"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"border"</span><span class="br0">)</span><span>;</span>
    <span style="color: rgb(0, 128, 255);">uicontrol</span><span class="br0">(</span>tab3<span>,</span> <span style="color: rgb(255, 0, 0);">"string"</span><span>,</span> <span style="color: rgb(255, 0, 0);">"button 3"</span><span class="br0">)</span><span>;</span>
<span style="color: rgb(176, 24, 19); font-weight: bold;">endfunction</span>
 
<span style="color: rgb(128, 128, 128);">//tab</span>
tab <span>=</span> createTab<span class="br0">(</span><span style="color: rgb(255, 0, 0);">"tab"</span><span class="br0">)</span><span>;</span></pre></td></tr></tbody></table>
      <pre class="moz-signature" cols="72">S.</pre>
      <pre class="moz-signature" cols="72">-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
<a class="moz-txt-link-freetext" href="http://www.utc.fr/%7Emottelet" moz-do-not-send="true">http://www.utc.fr/~mottelet</a></pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:users@lists.scilab.org">users@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/users">http://lists.scilab.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>