figure problem

Andreas Stewering-Bone Andreas.Stewering-Bone at gmx.de
Thu Apr 29 21:23:27 CEST 2010


Hello,

Are there any differences between figure() handling especially listboxes and 
their index handling between scilab 4.x and 5.x.

Following Code is running under Scilab 4.x but has problems under Scilab 5.x

hfig = figure(...
  'Tag', 'Select Slave', ...
  'BackgroundColor', [0.745098 0.745098 0.745098], ...
  'Position', [100 170 400 300]);
set(hfig,'figure_name','Select Slave');


hlist = uicontrol(hfig, 'style', 'listbox', ...
  'tag', 'ListBox1', ...
  'string', 'ListBox1', ...
  'position', [20 20 360 200]);



hobj = uicontrol(hfig, 'Style', 'pushbutton', ...
  'Tag', 'Button4', ...
  'String', 'Quit', ...
  'Callback', 'fin=%t;', ...
  'BackgroundColor', [0.745098 0.745098 0.745098], ...
  'ForegroundColor', [0 0 0], ...
  'Position', [250 260 100 20]);


hobj = uicontrol(hfig, 'Style', 'pushbutton', ...
  'Tag', 'Button5', ...
  'String', 'Select', ...
  'Callback', 'slave_selected_id=1', ...
  'BackgroundColor', [0.745098 0.745098 0.745098], ...
  'ForegroundColor', [0 0 0], ...
  'Position', [50 260 100 20]);


  set(hlist, 'string', initial);
  set(hlist, 'value',slaveconfig.slave_selected_id);
  while ~fin
    if slave_selected_id >= 0 then
       slaveconfig.slave_selected_id = get(hlist,'value');
       fin = %t;
    end
    sleep(1)
  end


Greatings


Andreas



More information about the users mailing list