function render_controls(this)
%RENDER_CONTROLS Render the Convert Dialog specific UIcontrols

%   Author(s): J. Schickler
%   Copyright 1988-2010 The MathWorks, Inc.

h    = get(this,'Handles');
hFig = get(this,'FigureHandle');
sz   = gui_sizes(this);

% Render the listbox in the "Convert To" frame.
strs = getconvertstructchoices(this);

cbs = callbacks(this);

h.label   = uicontrol(hFig, ...
    'Style',  'text', ...
    'String', getString(message('signal:sigtools:siggui:ConvertTo')), ...
    'HorizontalAlignment', 'Left', ...
    'Tag',    'convertto_label');

h.listbox = uicontrol(hFig,...
    'Style','listbox',...
    'BackgroundColor','White',...
    'String',getTranslatedStringcell('signal:sigtools:siggui',strs),...
    'Tag','convertto_listbox',...
    'Callback',{cbs.listbox, this});

set(this,'Handles',h);

hd = get(this, 'DialogHandles');

hLayout = siglayout.gridbaglayout(hFig, ...
    'HorizontalWeights', [1 0], ...
    'VerticalWeights', [0 1 0], ...
    'HorizontalGap', 5*sz.pixf, ...
    'VerticalGap',   5*sz.pixf);

wd = largestuiwidth([hd.ok hd.cancel])+12*sz.pixf;

hLayout.add(h.label, 1, [1 2], ...
    'MinimumHeight', sz.uh-sz.lblTweak, ...
    'Fill', 'Horizontal');

hLayout.add(h.listbox, 2, [1 2], ...
    'TopInset', -5*sz.pixf, ...
    'Fill', 'Both');

hLayout.add(hd.ok, 3, 1, ...
    'MinimumHeight', sz.bh, ...
    'MinimumWidth', wd, ...
    'Anchor', 'East');

hLayout.add(hd.cancel, 3, 2, ...
    'MinimumHeight', sz.bh, ...
    'MinimumWidth',  wd);

update_listbox(this);

listeners = [ ...
    handle.listener(this, this.findprop('TargetStructure'), ...
    'PropertyPostSet', @targetstructure_listener); ...
    handle.listener(this, this.findprop('Filter'), ...
    'PropertyPostSet', @filter_listener); ...
    ];

set(listeners, 'CallbackTarget', this);
set(this, 'WhenRenderedListeners', listeners);

% [EOF]
