%% set_pb
%    create the new cell push button
% inputs:
%   object:Grid - current Grid object
% outputs:
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = set_pb(object,fig,pos)
if(isempty(object.new_cell_pb) || ~ishghandle(object.new_cell_pb))
    object.new_cell_pb = uicontrol('style','push',...
        'units','pix',...
        'string','new',...
        'HorizontalAlign','left',...
        'Parent',fig,...
        'position',pos,...
        'callback',@(src,event)pb_new_call(object,src,event));
else
    set(object.new_cell_pb,'position',pos);
end
end

