I think you are talking about function createComponents(app) in MATLAB app designer.
Unfortunately, greyed out portion in MATLAB app designer cannot be edited.
Still, I think this answer might help, if you want to find a workaroundhttps://in.mathworks.com/matlabcentral/answers/413792-how-to-edit-auto-generated-code-in-app-designer