When working with Matlab GUIs, is there a way to place a “hint” in an Edit Text box? That is, text that will disappear once the user starts typing? I’ve used similar functionalities in Android, but I’m not as familiar with other GUIs, so I’m not sure how widespread this functionality is.
Share
This is possible in Matlab, but you have to define a custom
MouseClickCallback, which is only accessible using findjobj by Yair Altman (download it from the Matlab File Exchange using the link and save it somewhere on your Matlab path).Since I like the idea, I have written a function that conveniently takes care of all this. It creates a grayed-out, italic help text that disappears once you click the edit box.