Home > functions > gui > batch > batch_list > vb_batch_list_update_variable_listbox.m

vb_batch_list_update_variable_listbox

PURPOSE ^

update variable listbox.

SYNOPSIS ^

function vb_batch_list_update_variable_listbox(fig)

DESCRIPTION ^

 update variable listbox.
 [USAGE]
    vb_batch_list_update_variable_listbox(<fig>);
 [IN]
    fig : figure handle

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vb_batch_list_update_variable_listbox(fig)
0002 % update variable listbox.
0003 % [USAGE]
0004 %    vb_batch_list_update_variable_listbox(<fig>);
0005 % [IN]
0006 %    fig : figure handle
0007 %
0008 % Copyright (C) 2011, ATR All Rights Reserved.
0009 % License : New BSD License(see VBMEG_LICENSE.txt)
0010 
0011 
0012 %
0013 % --- Previous check
0014 %
0015 if ~exist('fig', 'var') || isempty(fig) || ~ishandle(fig)
0016     error('invalid figure handle is specified.');
0017 end
0018 
0019 %
0020 % --- Main Procedure
0021 %
0022 data = guidata(fig);
0023 
0024 [variable_list, table] = vb_batch_mgr_get_table_data(data.bmgr);
0025 set(data.H.variable_listbox, 'String', variable_list);
0026 
0027 % Adjust selected line number
0028 line_no = get(data.H.variable_listbox, 'Value');
0029 Nvalue = length(variable_list);
0030 if Nvalue < 1
0031     line_no = 1;
0032 elseif line_no > Nvalue
0033     line_no = Nvalue;
0034 end
0035 set(data.H.variable_listbox, 'Value', line_no);
0036 
0037 
0038 % Set the number of parameter set to be created.
0039 Nrow = size(table, 1);
0040 set(data.H.Nparm_set_text, 'String', num2str(Nrow));
0041 
0042 % Component Enable/Disable
0043 components = [data.H.variable_rename_push;
0044               data.H.variable_remove_push
0045               data.H.edit_table_push];
0046 if Nvalue
0047     set(components, 'Enable', 'on');
0048 else
0049     set(components, 'Enable', 'off');
0050 end

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005