@@ -112,36 +112,30 @@ function setup(obj)
112112 obj.Grid.Padding = 0 ;
113113
114114 % Create the standard edit control
115- obj.EditControl = matlab .ui .control .EditField(...
116- " Parent" ,obj .Grid ,...
117- " ValueChangedFcn" ,@(h ,e )obj .onTextChanged(e ));
115+ obj.EditControl = uieditfield(obj .Grid );
116+ obj.EditControl.ValueChangedFcn = @(h ,e )obj .onTextChanged(e );
118117 obj.EditControl.Layout.Column = [1 3 ];
119118 obj.EditControl.Layout.Row = 1 ;
120119
121120 % Create the optional dropdown control (unparented for now)
122- obj.DropdownControl = matlab .ui .control .DropDown(...
123- " Parent" ,[],...
124- " Editable" ,true ,...
125- " Value" ," " ,...
126- " ValueChangedFcn" ,@(h ,e )obj .onTextChanged(e ));
127- % obj.DropdownControl.Layout.Column = [1 3];
128- % obj.DropdownControl.Layout.Row = 1;
121+ obj.DropdownControl = uidropdown(" Parent" ,[]);
122+ obj.DropdownControl.Editable = true ;
123+ obj.DropdownControl.Value = " " ;
124+ obj.DropdownControl.ValueChangedFcn = @(h ,e )obj .onTextChanged(e );
129125
130126 % Create Button
131- obj.ButtonControl = matlab .ui .control .Button(...
132- " Parent" ,obj .Grid ,...
133- " Text" ," " ,...
134- " ButtonPushedFcn" ,@(h ,e )obj .onButtonPushed(e ));
127+ obj.ButtonControl = uibutton(obj .Grid );
128+ obj.ButtonControl.Text = " " ;
129+ obj.ButtonControl.ButtonPushedFcn = @(h ,e )obj .onButtonPushed(e );
135130 obj.ButtonControl.Layout.Column = 4 ;
136131 obj.ButtonControl.Layout.Row = 1 ;
137132 obj .updateButtonIcon();
138133
139134 % Create overlay
140- obj.WarnImage = matlab .ui .control .Image(...
141- " Parent" ,obj .Grid ,...
142- " ScaleMethod" ," none" ,...
143- " Visible" ," off" ,...
144- " ImageSource" ," warning_16.png" );
135+ obj.WarnImage = uiimage(obj .Grid );
136+ obj.WarnImage.ScaleMethod = " none" ;
137+ obj.WarnImage.Visible = " off" ;
138+ obj.WarnImage.ImageSource = " warning_16.png" ;
145139 obj.WarnImage.Layout.Column = 3 ;
146140 obj.WarnImage.Layout.Row = 1 ;
147141
0 commit comments