guibuilder A Graphic User Interface Builder guigencode

A Graphic User Interface Builder >> A Graphic User Interface Builder > guicontrolcreate

guicontrolcreate

Function to create statement of uicontrol generation for guibuilder.

Calling Sequence

uistring = guicontrolcreate(a)

Parameters

a

Handle of an uicontrol.

uistring

Output string which used to contruct an uicontrol on a gui.

Description

This function is called from the guibuilder to construct statement of an uicontrol. It could also be used seperately to add an uicontrol to a figure.

Examples

// Create a figure and an uicontrol
       f1=figure('position',[50 50 100 100]);
a = uicontrol(f1, 'units','normalized', 'style', 'pushbutton','string','Pushbutton','position',[0.1 0.1 0.5 0.5],'tag','mybutton');

// Get the string for the uicontrol construction
uistring = guicontrolcreate(a);

// Create a figure and use the contructed string to create an uicontrol on the figure
// Due to the default string is generated for guibuilder, some string manupulation need to be done before using it
f=figure('position',[50 50 100 100]);
temp_str = strsplit(uistring);
eval(strcat(temp_str(18:$)'));

See Also

Authors

guibuilder A Graphic User Interface Builder guigencode