[Scilab-users] uicontrol tab

Stéphane Mottelet stephane.mottelet at utc.fr
Mon Feb 26 16:26:54 CET 2018


Le 26/02/2018 à 16:20, James Holland a écrit :
> 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: http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users

Hello,

there is an example in the tests of gui module :

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
	

// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2014 - Scilab Enterprises - Antoine ELIAS
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
  
function  tabs=  createTab(uiType)
     f=  figure("dockable",  "off"  ,"infobar_visible",  "off",  "toolbar_visible",  "off",  "menubar_visible",  "off",  "default_axes",  "off",  "layout",  "border")
     f.axes_size  =  [470,  410];
  
     tabs=  uicontrol(f,  "style",  uiType,  "tag"  ,"tab",  "constraints",  createConstraints("border",  "center"));
  
     tab1=  uicontrol(tabs,  "style",  "frame",  "tag",  "tab 1",  "string",  "tab 1",  "layout",  "border");
     uicontrol(tab1,  "string",  "button 1");
  
     tab2=  uicontrol(tabs,  "style",  "frame",  "tag",  "tab 2",  "string",  "tab 2",  "layout",  "border");
     uicontrol(tab2,  "string",  "button 2");
  
     tab3=  uicontrol(tabs,  "style",  "frame",  "tag",  "tab 3",  "string",  "tab 3",  "layout",  "border");
     uicontrol(tab3,  "string",  "button 3");
endfunction
  
//tab
tab=  createTab("tab");

S.

-- 
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
http://www.utc.fr/~mottelet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180226/1d906926/attachment.htm>


More information about the users mailing list