Back

Tip 24. Context Sensitive Micro Help for Datawindows.

If you have an MDI application you can easily provide context sensitive by using the tag value of datawindow columns.

Add this code to an ancestor datawindow control in the itemfocuschanged event.

This sample use a global variable for the reference to the MDI frame. A global flag is also used to decide whether to display the database column name which can be use full if end users need to write there own reports based data that they enter into your application.

//---------------------------------------------------------------------------
//  Event Name : Itemfocuschanged for ua_dw_std
//     Purpose : Sets MicroHelp for current field
//        Sets : None
//---------------------------------------------------------------------------
IF IsValid(gw_mdi_frame) and dwo.Tag <> '?' THEN

   IF gb_show_column_in_tag THEN
         // Display Column Tag and Database Column
      gw_mdi_frame.SetMicroHelp(dwo.Tag + " ( " + dwo.dbName + " )")
   ELSE
         // Display Column Tag
      gw_mdi_frame.SetMicroHelp(dwo.Tag)
   END IF
END IF
See Also Improving the Standard Validation Messages.

Added before 01 Jan 2000

Back