@Spigge - All edit box formats with dialog prompts are implemented with uicontrol's ButtonDownFcn (instead of Callback) and Enable='inactive'. So, in order for you to toggle the dir edit box Enable state, you need to do the following:
From Enabled -> Disabled
1. Save dir edit's ButtonDownFcn (I usually use the edit's UserData property)
2. Set edit's Enable to 'off' and ButtonDownFcn to  (and UserData with the callback function)
1. Retrieve the saved ButtonDownFcn callback
2. Set edit's Enable to 'inactive' and reinstate ButtonDownFcn
Hope this helps
I have created a check box that controls the enable state of an edit text box with the format 'dir'. The edit box is initially disabled (grayed) and gets enabled (white) when the check box is checked and back to disabled when the check box is unchecked. So far so good. The problem is that the default behaviour of the edit box on mouse click, which is to open a file dialog (via UIGETDIR) and then display the selected directory as a string in the edit box, is lost when disabled and enabled this way. Instead it behaves like a normal edit box of format 'text'. Why does this happen and how can I get it to work properly you think?
something went wrong with my last submission...
I think there is an error with the tooltips on line 1070: changed Prompt(:,3) to Prompt(:,4)
I also added the following line (2293) to have tooltips for all elements:
% style-dependent configuration