reset listbox selection in demo_gui 84/13984/3
Antoine ELIAS [Tue, 11 Mar 2014 17:29:03 +0000 (18:29 +0100)]
Change-Id: I8de2cde211d6a497804f60f2008f48c9c66a1c76

scilab/modules/demo_tools/gui/demo_gui.xml
scilab/modules/demo_tools/macros/demo_gui.sci

index 198a8b3..fcf555f 100644 (file)
@@ -41,7 +41,7 @@
             <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
                 <title style="empty"/>
             </borders>
-            <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" listboxtop="1" tag="listbox_74" value="3.0"/>
+            <listbox callback="script_path = demo_gui_update();if ~isempty(script_path) then exec(script_path, -1);end;clear script_path;" callback_type="0" fontsize="12.0" gridbagfill="3" gridbaggrid="1,1,1,4" gridbagweight="1.0,1.0" listboxtop="1" tag="listbox_4" value="3.0"/>
         </frame>
         <frame backgroundcolor="1.0,1.0,1.0" gridbagfill="3" gridbaggrid="3,1,1,1" gridbagpreferredsize="0,0" gridbagweight="1.0,1.0" layout="1" tag="frame_3" visible="off">
             <borders color="black" fontangle="normal" fontname="" fontsize="12" fontweight="bold" justification="1" style="titled" title="">
index 7aa2bbb..c931e18 100644 (file)
@@ -142,6 +142,9 @@ function resize_gui(frame_number)
     axes_w = frame_number * 250; // axes width
     demo_fig = get("scilab_demo_fig");
     demo_fig.axes_size(1) = axes_w;
-    demo_fig.children($:-1:$-(frame_number+1)).visible = "on";
+    demo_fig.children($:-1:$-(frame_number-1)).visible = "on";
+    //hide other frame
     demo_fig.children($-frame_number:-1:1).visible = "off";
+    //clean listbox
+    demo_fig.children($-frame_number:-1:1).children(1).string = "";
 endfunction