\
Tips and Tricks
User Interface Tips
Add Dialog Identification To Titlebar
Add Dialog Identification To Titlebar |
Sometimes it can be hard when manipulating the user interface to work out
which dialog does what (for example when you'd like to position a new
dialog with the "Dialog" command).
The following code shows how all existing dialogs can be tweeked to
preceed the existing title with the dialog name in square brackets so
that as you move from dialog to dialog the name is readily visible:
#define? UISAMPLE_DIALOGS_ID_IN_TITLE.D N ;;In developer mode?
#define? UISAMPLE_DIALOGS_ID_IN_TITLE.P N ;;In production mode? - probably not!
#if ['<$UISAMPLE_DIALOGS_ID_IN_TITLE.[MMMODE]>' = 'Y']
;--- We wish to add the dialog name to the title ------------------------
<$Table "Dialog">
<$Row @Where="" @OK=^? > 0^ *Title=^"[\[]" & <$COLSTR.Dialog.Dialog> & "[\]] - " & <$COLSTR.Dialog.Title>^>
<$/Table>
#endif
As the above code is already included by "UISAMPLE.MMH" you
only need to override the switch, for example "UISAMPLE_DIALOGS_ID_IN_TITLE.D".