Nelson
  • Nelson GitBook 📚
  • docs
    • Nelson Documentation
  • markdown
    • Languages
    • en
      • Summary
      • Assertion functions
        • SUMMARY
        • assert
        • assert_checkerror
        • assert_isapprox
        • assert_isequal
        • assert_isfalse
        • assert_istrue
      • Audio playback
        • SUMMARY
        • audiodevinfo
        • audioinfo
        • audiometadata
        • audioplayer
        • audioplayer_delete
        • audioplayer_fieldnames
        • audioplayer_get
        • audioplayer_pause
        • audioplayer_set
        • audioplayer_stop
        • audioplayer_used
        • audioread
        • audiosupportedformats
        • audiowrite
        • beep
        • isplaying
        • lin2mu
        • mu2lin
        • play
        • playblocking
        • resume
        • sound
        • soundsc
        • stop
      • changelogs
        • CHANGELOG-0.1.x
        • CHANGELOG-0.2.x
        • CHANGELOG-0.3.x
        • CHANGELOG-0.4.x
        • CHANGELOG-0.5.x
        • Changelog
        • Changelog
        • Changelog
      • Characters encoding
        • SUMMARY
        • native2unicode
        • nativecharset
        • unicode2native
      • COM engine
        • COM examples
        • COM_delete
        • COM_fieldnames
        • COM_get
        • COM_invoke
        • COM_ismethod
        • COM_isprop
        • COM_methods
        • COM_range
        • COM_set
        • COM_used
        • COM_xlsfinfo
        • COM_xlsread
        • COM_xlswrite
        • SUMMARY
        • actxGetRunningServer
        • actxcontrollist
        • actxserver
        • actxserverlist
        • iscom
      • Console
        • SUMMARY
        • clc
        • input
        • terminal_size
      • Constructors functions
        • Inf
        • NaN
        • SUMMARY
        • diag
        • eps
        • eye
        • i
        • ones
        • pi
        • zeros
      • Control System functions
        • SUMMARY
        • abcdchk
        • acker
        • append
        • augstate
        • balreal
        • bdschur
        • bode
        • c2d
        • care
        • cloop
        • compreal
        • ctrb
        • ctrbf
        • d2c
        • damp
        • dare
        • dcgain
        • dlqr
        • dlyap
        • dsort
        • esort
        • evalfr
        • feedback
        • freqresp
        • gensig
        • gram
        • hsvd
        • impulse
        • initial
        • isct
        • isdt
        • islti
        • issiso
        • isstatic
        • kalman
        • lqe
        • lqed
        • lqr
        • lqry
        • lsim
        • lyap
        • minreal
        • nyquist
        • obsv
        • obsvf
        • ord2
        • padecoef
        • parallel
        • pole
        • series
        • ss
        • ss2tf
        • ssdata
        • ssdelete
        • ssselect
        • step
        • tf
        • tf2ss
        • tfdata
        • tzero
        • zero
      • Core
        • SUMMARY
        • banner
        • eval
        • evalc
        • evalin
        • execstr
        • exist
        • exit
        • feature
        • inputname
        • isunicodesupported
        • license
        • maxNumCompThreads
        • namelengthmax
        • nargin
        • narginchk
        • nargout
        • nargoutchk
        • nelsonroot
        • nfilename
        • pause
        • prefdir
        • quit
        • run
        • sha256
        • version
      • Data analysis
        • SUMMARY
        • conv
        • conv2
        • cumprod
        • cumsum
        • ismissing
        • issorted
        • max
        • min
        • prod
        • sort
        • sum
        • unique
      • Data structures
        • SUMMARY
        • cell
        • cell2mat
        • cell2struct
        • celldisp
        • cellfun
        • cellstr
        • fieldnames
        • getfield
        • iscellstr
        • isfield
        • namedargs2cell
        • num2cell
        • orderfields
        • rmfield
        • setfield
        • struct
        • struct2cell
      • Debugger functions
        • SUMMARY
        • dbstack
      • Dictionaries
        • SUMMARY
        • configureDictionary
        • dictionary
        • entries
        • insert
        • isConfigured
        • isKey
        • keyHash
        • keyMatch
        • keys
        • lookup
        • numEntries
        • remove
        • types
        • values
      • Display format
        • SUMMARY
        • disp
        • display
        • echo
        • format
        • formattedDisplayText
      • Double
        • SUMMARY
        • double
        • flintmax
        • realmax
        • realmin
      • Dynamic link
        • Build C/C++ code on the fly
        • Supported C/C++ compilers
        • libpointer datatype
        • SUMMARY
        • cmake
        • configuremingw
        • configuremsvc
        • dlcall
        • dlclose
        • dlgeneratecleaner
        • dlgenerategateway
        • dlgenerateloader
        • dlgeneratemake
        • dlgenerateunloader
        • dlgetnelsonincludes
        • dlgetnelsonlibraries
        • dllib_used
        • dllibinfo
        • dllibisloaded
        • dlmake
        • dlopen
        • dlsym
        • dlsym_delete
        • dlsym_used
        • findcmake
        • getdynlibext
        • havecompiler
        • libpointer
        • libpointer_delete
        • libpointer_isNull
        • libpointer_plus
        • libpointer_reshape
        • libpointer_setdatatype
        • libpointer_used
        • loadcompilerconf
        • removecompilerconf
        • vswhere
      • Elementary functions
        • SUMMARY
        • abs
        • allfinite
        • angle
        • base2dec
        • bernsteinMatrix
        • bin2dec
        • bin2num
        • blkdiag
        • cast
        • ceil
        • circshift
        • complex
        • conj
        • deal
        • dec2base
        • dec2bin
        • dec2hex
        • exp
        • factorial
        • filter
        • find
        • fix
        • flip
        • flipdim
        • fliplr
        • flipud
        • floor
        • hadamard
        • hankel
        • hex2dec
        • hilb
        • hypot
        • imag
        • ind2sub
        • invhilb
        • ipermute
        • isapprox
        • iscolumn
        • istriu
        • isequal
        • isequaln
        • isequalto
        • isfinite
        • isinf
        • ismatrix
        • isnan
        • isrow
        • isscalar
        • istril
        • istriu
        • isvector
        • length
        • linspace
        • log
        • log10
        • log1p
        • log2
        • logspace
        • magic
        • meshgrid
        • minus
        • mod
        • ndgrid
        • ndims
        • nextpow2
        • norm
        • normest
        • nthroot
        • num2bin
        • numel
        • permute
        • pinv
        • pow2
        • real
        • rem
        • repmat
        • reshape
        • rosser
        • rot90
        • round
        • shiftdim
        • sign
        • size
        • sqrt
        • squeeze
        • sub2ind
        • substruct
        • swapbytes
        • toeplitz
        • tril
        • triu
        • vander
        • wilkinson
      • Engine
        • SUMMARY
        • argv
        • executable
        • finish
        • getnelsonmode
        • isquietmode
        • System Requirements
        • #! shebang
        • startup
      • Error manager
        • MException
        • SUMMARY
        • error
        • getLastReport
        • lasterror
        • lastwarn
        • rethrow
        • throw
        • throwAsCaller
        • warning
      • Fortran to C
        • SUMMARY
        • f2c
      • FFTW
        • FFTW License
        • FFTWwrapper
        • SUMMARY
        • fft
        • fft2
        • fftn
        • fftshift
        • fftw
        • ifft
        • ifftn
        • ifftshift
      • File archiver functions
        • SUMMARY
        • unzip
        • zip
      • Files and folders functions
        • SUMMARY
        • cd
        • copyfile
        • diff_file
        • dir
        • fileparts
        • filesep
        • fullfile
        • fullpath
        • isdir
        • isfile
        • isfolder
        • ls
        • mkdir
        • pathsep
        • pwd
        • relativepath
        • rmdir
        • rmfile
        • tempdir
        • tempname
        • userdir
      • Function_handle functions
        • SUMMARY
        • Anonymous Functions
        • func2str
        • isfunction_handle
        • str2func
      • Functions manager
        • SUMMARY
        • addpath
        • builtin
        • clearfun
        • feval
        • inmem
        • isbuiltin
        • ismacro
        • ismex
        • macroargs
        • path
        • private functions
        • rehash
        • restoredefaultpath
        • rmpath
        • userpath
        • what
        • which
      • Geometry
        • SUMMARY
        • rotx
        • roty
        • rotz
      • Graphics functions
        • SUMMARY
        • abyss
        • ancestor
        • autumn
        • axes
        • axis
        • bar
        • bone
        • cla
        • clf
        • clim
        • close
        • colorbar
        • colormap
        • colstyle
        • contour
        • contour3
        • cool
        • copper
        • cylinder
        • drawnow
        • figure
        • fill
        • frame2im
        • gca
        • gcf
        • getframe
        • Managing Callback Interruptions in Nelson
        • gray
        • grid
        • groot
        • hggroup
        • hist
        • hold
        • hot
        • im2double
        • im2frame
        • image
        • imagesc
        • imread
        • imshow
        • imwrite
        • is2D
        • isValidGraphicsProperty
        • isgraphics
        • ishold
        • jet
        • legend
        • line
        • loglog
        • mesh
        • meshz
        • movie
        • newplot
        • pan
        • parula
        • patch
        • pcolor
        • pie
        • pink
        • plot
        • plot3
        • quiver
        • refresh
        • rgbplot
        • ribbon
        • rotate3d
        • saveas
        • scatter
        • semilogx
        • semilogy
        • sky
        • sphere
        • spring
        • spy
        • stairs
        • stem
        • subplot
        • summer
        • surf
        • surface
        • text
        • title
        • turbo
        • uicontrol
        • validatecolor
        • view
        • viridis
        • waitfor
        • waitforbuttonpress
        • waterfall
        • white
        • winter
        • xlabel
        • xlim
        • ylabel
        • ylim
        • zlabel
        • zlim
        • zoom
      • Graphics I/O functions
        • SUMMARY
        • copygraphics
        • imformats
        • imread
        • imwrite
        • saveas
      • Gui module
        • SUMMARY
        • commandhistory
        • errordlg
        • filebrowser
        • helpdlg
        • inserthtml
        • lookandfeel
        • msgbox
        • qt_verbose
        • questdlg
        • uigetdir
        • helpdlg
        • workspace
      • Handle
        • SUMMARY
        • delete
        • get
        • invoke
        • ismethod
        • isprop
        • isvalid
        • methods
        • properties
        • set
      • HDF5
        • SUMMARY
        • h5create
        • h5dump
        • h5ls
        • h5read
        • h5readatt
        • h5write
        • h5writeatt
        • isnh5file
        • loadnh5
        • savenh5
        • whonh5
        • whosnh5
      • Help browser functions
        • SUMMARY
        • doc
        • helpbrowser
      • Help tools functions
        • SUMMARY
        • buildhelp
        • buildhelpmd
        • buildhelpweb
        • docroot
        • headcomments
        • htmltopdf
        • markdown
        • xmldocbuild
        • xmldocchecker
        • xmldoctohelp
        • xmldoctohtml
        • xmldoctomd
      • History manager
        • SUMMARY
        • history
      • I18n functions
        • SUMMARY
        • gettext
        • i18nHelpers
        • poheader
      • Integers type
        • SUMMARY
        • int16
        • int32
        • int64
        • int8
        • intmax
        • intmin
        • uint16
        • uint32
        • uint64
        • uint8
      • Interpreter functions
        • SUMMARY
        • abort
        • break
        • continue
        • for
        • function
        • if
        • iskeyword
        • keyboard
        • max_recursion_depth
        • numeric types
        • parsefile
        • parsestring
        • switch
        • try
        • while
      • Inter Process Communication
        • SUMMARY
        • getpid
        • ipc
      • JavaScript Object Notation
        • SUMMARY
        • jsondecode
        • jsonencode
        • jsonprettyprint
      • Julia engine
        • SUMMARY
        • jlenv
        • jlrun
        • jlrunfile
        • Julia Nelson types
      • license
        • gpl-3.0
        • GNU LESSER GENERAL PUBLIC LICENSE
        • Nelson license:
      • Linear algebra
        • SUMMARY
        • balance
        • bandwidth
        • chol
        • cond
        • condeig
        • det
        • diff
        • eig
        • expm
        • gradient
        • inv
        • isbanded
        • ishermitian
        • issymmetric
        • kron
        • logm
        • lu
        • orth
        • planerot
        • rank
        • rcond
        • rref
        • rsf2csf
        • schur
        • sqrtm
        • subspace
        • svd
        • trace
        • vecnorm
      • Localization functions
        • SUMMARY
        • getavailablelanguages
        • getdefaultlanguage
        • getlanguage
        • setlanguage
      • Logical type functions
        • SUMMARY
        • false
        • logical
        • true
        • xor
      • MATIO
        • SUMMARY
        • ismatfile
        • loadmat
        • savemat
        • whomat
        • whosmat
      • Memory manager functions
        • SUMMARY
        • acquirevar
        • assignin
        • clear
        • global
        • isglobal
        • isvar
        • memory
        • persistent
        • varislock
        • varlock
        • varunlock
        • who
        • whos
      • MEX functions
        • SUMMARY
        • dlgeneratemexgateway
        • engClose
        • engEvalString
        • engGetVariable
        • engGetVisible
        • engOpen
        • engOpenSingleUse
        • engOutputBuffer
        • engPutVariable
        • engSetVisible
        • mex
        • mexAtExit
        • mexCallMATLAB
        • mexCallMATLABWithTrap
        • mexext
      • Modules manager
        • SUMMARY
        • addgateway
        • addmodule
        • gatewayinfo
        • getmodules
        • ismodule
        • module.json
        • modulepath
        • nmm
        • nmm_build_help
        • nmm_build_loader
        • removegateway
        • removemodule
        • requiremodule
        • semver
        • toolboxdir
        • usermodulesdir
      • Message Passing Interface
        • MPI_Allreduce
        • MPI_Barrier
        • MPI_Bcast
        • MPI_Comm_delete
        • MPI_Comm_get_name
        • MPI_Comm_object
        • MPI_Comm_rank
        • MPI_Comm_size
        • MPI_Comm_split
        • MPI_Comm_used
        • MPI_Finalize
        • MPI_Get_library_version
        • MPI_Get_processor_name
        • MPI_Get_version
        • MPI_Init
        • MPI_Initialized
        • MPI_Iprobe
        • MPI_Probe
        • MPI_Recv
        • MPI_Reduce
        • MPI_Send
        • MPI examples
        • MPI overview
        • SUMMARY
        • mpiexec
      • NIG
        • SUMMARY
        • nig
      • Operators
        • SUMMARY
        • all
        • and
        • any
        • bitand
        • bitor
        • bitxor
        • cat
        • colon
        • ctranspose
        • eq
        • ge
        • gt
        • horzcat
        • ismember
        • ldivide
        • le
        • lt
        • minus
        • mldivide
        • mpower
        • mrdivide
        • mtimes
        • ne
        • not
        • or
        • plus
        • power
        • rdivide
        • shortcutand
        • shortcutor
        • subsasgn
        • subsindex
        • subsref
        • mtimes
        • transpose
        • uminus
        • uplus
        • vertcat
      • OS functions
        • SUMMARY
        • cmdsep
        • computer
        • createGUID
        • getenv
        • hostname
        • ismac
        • ispc
        • isunix
        • searchenv
        • setenv
        • system
        • username
        • winopen
        • winqueryreg
      • Overloading
        • SUMMARY
        • overloading
      • Parallel
        • SUMMARY
        • afterAll
        • afterEach
        • backgroundPool
        • cancel
        • cancelAll
        • fetchNext
        • fetchOutputs
        • parfeval
        • wait
      • Polynomials
        • SUMMARY
        • deconv
        • poly
        • polyder
        • polyfit
        • polyint
        • polyval
        • polyvalm
        • roots
      • Profiling tools
        • SUMMARY
        • profile
        • profsave
      • Python engine
        • The power of calling Python from Nelson
        • How to install python package
        • Python Nelson types
        • Python operators
        • SUMMARY
        • pyargs
        • pyenv
        • pyrun
        • pyrunfile
      • QML engine
        • QObject_classname
        • QObject_findchildren
        • QObject_get
        • QObject_iswidgettype
        • QObject_iswindowtype
        • QObject_methodsignature
        • QObject_root
        • QObject_set
        • QObject_undefine
        • QObject_used
        • SUMMARY
        • nelsonObject
        • qml_addimportpath
        • qml_addpluginpath
        • qml_clearcomponentcache
        • qml_collectgarbage
        • qml_createqquickview
        • qml_demos
        • qml_evaluatefile
        • qml_evaluatestring
        • qml_importpathlist
        • qml_loadfile
        • qml_loadstring
        • qml_offlinestoragepath
        • qml_pluginpathlist
        • qml_setofflinestoragepath
        • qt_constant
        • qt_version
      • Random
        • SUMMARY
        • rand
        • randn
        • randperm
        • rng
      • Signal Processing
        • SUMMARY
        • bartlett
        • blackman
        • db2mag
        • db2pow
        • filter2
        • hamming
        • hann
        • mag2db
        • pow2db
        • sinc
        • xcorr2
        • zp2tf
      • Single type
        • SUMMARY
        • single
      • SIO client
        • SUMMARY
        • doc
        • sioemit
        • siogetvariable
      • Subroutine Library In COntrol Theory
        • SLICOT License
        • SUMMARY
        • slicot_ab01od
        • slicot_ab04md
        • slicot_ab07nd
        • slicot_ab08nd
        • slicot_ag08bd
        • slicot_mb02md
        • slicot_mb03od
        • slicot_mb03pd
        • slicot_mb03rd
        • slicot_mb04gd
        • slicot_mb04md
        • slicot_mb05od
        • slicot_mc01td
        • slicot_sb01bd
        • slicot_sb02od
        • slicot_sb03md
        • slicot_sb03od
        • slicot_sb04md
        • slicot_sb04qd
        • slicot_sb10jd
        • slicot_sg02ad
        • slicot_tb01id
        • slicot_tg01ad
      • Sparse type
        • IJV
        • SUMMARY
        • full
        • nnz
        • nzmax
        • sparse
        • speye
        • spones
      • Special functions
        • SUMMARY
        • betainc
        • cross
        • dot
        • factor
        • gamma
        • gammaln
        • gcd
        • interp1
        • peaks
        • primes
      • Spreadsheet
        • SUMMARY
        • csvread
        • csvwrite
        • detectImportOptions
        • dlmread
        • dlmwrite
        • readcell
        • readmatrix
        • readtable
        • writecell
        • writematrix
        • writetable
      • Statistics
        • SUMMARY
        • corrcoef
        • cov
        • mean
        • normpdf
        • var
      • Stream manager
        • SUMMARY
        • diary
        • fclose
        • feof
        • ferror
        • fgetl
        • fgets
        • fileread
        • filewrite
        • fopen
        • fprintf
        • fread
        • frewind
        • fscanf
        • fseek
        • fsize
        • ftell
        • fwrite
        • load
        • save
        • sscanf
      • String type
        • SUMMARY
        • append
        • blanks
        • char
        • contains
        • convertCharsToStrings
        • convertStringsToChars
        • count
        • deblank
        • endsWith
        • int2str
        • isStringScalar
        • isletter
        • isspace
        • join
        • mat2str
        • matches
        • newline
        • num2str
        • replace
        • sprintf
        • startsWith
        • str2double
        • strcat
        • strcmp
        • strcmpi
        • strfind
        • string
        • strings
        • strjust
        • strlength
        • strncmp
        • strncmpi
        • strrep
        • strtrim
        • tolower
        • toupper
      • Tables
        • Accessing and Manipulating Tables in Nelson
        • Direct computation with Table
        • Read/Write table to files
        • SUMMARY
        • array2table
        • cell2table
        • head
        • height
        • istable
        • removevars
        • renamevars
        • struct2table
        • table
        • table2array
        • table2cell
        • table2struct
        • tail
        • width
      • Tests manager
        • SUMMARY
        • test_makeref
        • test_run
        • skip_testsuite
      • Text editor
        • SUMMARY
        • edit
        • editor
        • smartindent
      • Time functions
        • SUMMARY
        • addtodate
        • calendar
        • clock
        • cputime
        • date
        • datenum
        • datestr
        • datevec
        • eomday
        • etime
        • hour
        • leapyear
        • minute
        • now
        • second
        • sleep
        • tic
        • time
        • timeit
        • toc
        • weekday
      • Trigonometric functions
        • SUMMARY
        • acos
        • acosd
        • acosh
        • acot
        • acotd
        • acoth
        • acsc
        • acscd
        • acsch
        • asec
        • asecd
        • asech
        • asin
        • asind
        • asinh
        • atan
        • atan2
        • atan2d
        • atand
        • atanh
        • cart2pol
        • cart2sph
        • cos
        • cosd
        • cosh
        • cosm
        • cospi
        • cot
        • cotd
        • coth
        • csc
        • cscd
        • csch
        • deg2rad
        • pol2cart
        • rad2deg
        • sec
        • secd
        • sech
        • sin
        • sind
        • sinh
        • sinm
        • sinpi
        • sph2cart
        • tan
        • tand
        • tanh
        • tanm
      • Types module
        • SUMMARY
        • class
        • isa
        • iscell
        • ischar
        • isclass
        • isdouble
        • isempty
        • isfloat
        • ishandle
        • isint16
        • isint32
        • isint64
        • isint8
        • isinteger
        • islogical
        • isnumeric
        • isobject
        • isreal
        • issingle
        • issparse
        • isstring
        • isstruct
        • isuint16
        • isuint32
        • isuint64
        • isuint8
        • isvarname
      • Validators
        • SUMMARY
        • mustBeA
        • mustBeColumn
        • mustBeFile
        • mustBeFinite
        • mustBeFloat
        • mustBeFolder
        • mustBeGreaterThan
        • mustBeGreaterThanOrEqual
        • mustBeInRange
        • mustBeInteger
        • mustBeLessThan
        • mustBeLessThanOrEqual
        • mustBeLogical
        • mustBeLogicalScalar
        • mustBeMatrix
        • mustBeMember
        • mustBeNegative
        • mustBeNonNan
        • mustBeNonSparse
        • mustBeNonZero
        • mustBeNonempty
        • mustBeNonmissing
        • mustBeNonnegative
        • mustBeNonpositive
        • mustBeNonzeroLengthText
        • mustBeNumeric
        • mustBeNumericOrLogical
        • mustBePositive
        • mustBeReal
        • mustBeRow
        • mustBeScalarOrEmpty
        • mustBeSparse
        • mustBeText
        • mustBeTextScalar
        • mustBeValidVariableName
        • mustBeVector
      • Web tools
        • SUMMARY
        • checkupdate
        • repo
        • urlencode
        • weboptions
        • webread
        • websave
        • webwrite
    • fr
      • changelogs
        • CHANGELOG-0.1.x
        • CHANGELOG-0.2.x
        • CHANGELOG-0.3.x
        • CHANGELOG-0.4.x
        • CHANGELOG-0.5.x
        • Changelog
        • Changelog
        • Changelog
      • license
        • gpl-3.0
        • GNU LESSER GENERAL PUBLIC LICENSE
        • Nelson license:
Powered by GitBook
On this page
  • Syntax
  • Input argument
  • Output argument
  • Description
  • Examples
  • See also
  • History
  • Author

Was this helpful?

  1. markdown
  2. en
  3. Graphics functions

uicontrol

Create user interface component.

Syntax

  • c = uicontrol()

  • c = uicontrol(propertyName, propertyValue)

  • c = uicontrol(parent)

  • c = uicontrol(parent, propertyName, propertyValue, ...)

  • uicontrol(c)

Input argument

  • parent - figure graphics object.

  • propertyName - property name: a scalar string or row vector character.

  • propertyValue - property value: a value compatible with property name.

  • c - an User Interface control object.

Output argument

  • c - an User Interface control object.

Description

c = uicontrol creates a push button, which is the default user interface control, within the current figure and returns the associated uicontrol object. If no figure is currently open, Nelson generates one using the figure function.

c = uicontrol(propertyName, propertyValue) creates a user interface control with properties defined by one or more name-value pair arguments. For instance, specifying 'Style', 'button' will create a button.

c = uicontrol(parent) creates the default user interface control (push button) within the specified parent container, rather than defaulting to the current figure.

c = uicontrol(parent, propertyName, propertyValue) creates a user interface control within the specified parent container, allowing you to define its properties using one or more name-value pair arguments.

uicontrol(c) sets the focus to a previously defined user interface control, bringing it to the forefront for user interaction.

List of properties:

BackgroundColor: Background color, specified as an RGB triplet, a hexadecimal color code, or a valid color name.

BeingDeleted: Deletion status. on/off logical value.

BusyAction: Callback queuing specified as 'queue' (default) or 'cancel'. The property determines how Nelso handles the execution of interrupting callbacks.

ButtonDownFcn: Button-press callback function

CData:An optional icon can be specified as a 3-D array of truecolor RGB values. The array values can be either: Double-precision numbers ranging from 0.0 to 1.0, or uint8 numbers ranging from 0 to 255

Callback: Primary callback function: '' (default), function handle, cell array or character vector.

Children: UIControl children: empty array.

CreateFcn: Component creation function.

DeleteFcn: Component deletion function.

Enable: Operational state of user interface control.

FontAngle: Font angle: 'italic' or 'normal' (default).

FontName: Font name: system supported font name.

FontSize: Font size: positive number.

FontUnits: Font units: 'normalized', 'inches', 'centimeters', 'pixels' or 'points' (default).

FontWeight: Font weight: 'bold' or 'normal' (default).

ForeGround: Text color, specified as an RGB triplet, a hexadecimal color code, or valid color name.

HandleVisibility: Visibility of uiControl handle.

HorizontalAlignment: Alignment of uicontrol text 'left', 'right' or 'center' (default).

Interruptible: Callback interruption 'on' (default).

KeyPressFcn: Key press callback function.

KeyReleaseFcn: Key release callback function

ListboxTop: Index of top item in list box: integer value or 1 (default).

Max: Maximum value: number or 1 (default).

Min: Minimum value: number or 0 (default).

Parent: Parent object: Figure.

Position: Location and size: [left bottom width height].

SliderStep: Slider step size: [minorstep majorstep] or [0.01 0.10] (default).

String: Text to display: character vector, cell array of character vectors or string array.

Style: 'pushbutton' (default), 'togglebutton', 'checkbox', 'radiobutton', 'edit', 'text', 'slider'.

Tooltip: Tooltip: character vector or string scalar.

Type: 'uicontrol'

UserData: User data array or [] (default).

Value: Current value: number

Visible: State of visibility: 'on' (default).

Examples

Pushbutton

f = figure;
b = uicontrol(f,'Style','pushbutton', 'String', 'Click Me', 'Position', [100 100 60 30], 'Callback', 'disp(''Hello World!'')')

Checkbox

f = figure();
h = uicontrol('Style', 'checkbox', 'String', 'Click Me!', 'Position', [100, 100, 100, 50]);

Edit

f = figure();
h = uicontrol('Style', 'edit', 'String', 'Click Me!', 'Position', [100, 100, 100, 50]);

Image

hFig = figure('Position', [100, 100, 300, 300]);
imgSize = 50;  % Size of the image
[X, Y] = meshgrid(1:imgSize, 1:imgSize);
CData = cat(3, X/imgSize, Y/imgSize, zeros(imgSize));
CData = im2double(CData);  % Ensure the image is of type double
hButton = uicontrol('Style', 'pushbutton',  'Position', [100, 100, 100, 100], 'CData', CData, 'String', 'Click Me!');

uicontrol demo

addpath([modulepath('graphics','root'), '/examples/uicontrol'])
edit uicontrol_demo
uicontrol_demo

uicontrol demo Interruptible

addpath([modulepath('graphics','root'), '/examples/uicontrol'])
edit uicontrol_demo_interruptible
uicontrol_demo_interruptible

See also

History

Version
Description

1.7.0

initial version

Author

Allan CORNET

PreviousturboNextvalidatecolor

Last updated 8 months ago

Was this helpful?

, .

figure
Managing Callback Interruptions in Nelson