how to make a button not visible but still be able to press it in matlab

You can set the visibility of a button to 'off' in MATLAB while still keeping it enabled for clicking. Here's an example code snippet:

main.m
fig = uifigure;
button = uibutton(fig, 'Text', 'Clickable Button', 'Position', [100, 100, 120, 30]);
button.Visible = 'off'; % Set the button to be not visible

% You can still interact with the button even though it's not visible
button.Visible = 'on'; % Make the button visible again
286 chars
7 lines

This way, the button will not be visible on the GUI but can still be interacted with.

related categories

gistlibby LogSnag