Procedure OnCreateDefaultHeaderMenu
Fires once at design-time to initialize a default WebContextMenu.
This can be used to customize the WebList client-side using Grouping and Column Showing/Hiding. Using this function, the developer is able to remove or add features to the default menu that is shown with a right-mouse click on the cWebList header.
The following is an example of the default menu which you can extend.
{ MethodType=Event } Procedure OnCreateDefaultHeaderMenu Handle hoDefaultHeaderMenu hoChild // First create a WebContextMenu which is automatilcally a child of the WebList. Get CreateNamed of Self (RefClass(cWebContextMenu)) "oDefaultHeaderMenu" to hoDefaultHeaderMenu // Optionally set a maximum with. Set piWidth of hoDefaultHeaderMenu to 220 // Add child cWebMenuItems or abstractions thereof to give the menu it's items. // The following are pre-defined classes that come with the Web Framework. // A cWebMenuColumnList to show and hide columns at will if the cWebList allows it! Get CreateNamed of hoDefaultHeaderMenu (RefClass(cWebMenuColumnList)) "oColumnList" to hoChild // A cWebMenuColumnRestorer to restore the column layout at will if the cWebList allows it! Get CreateNamed of hoDefaultHeaderMenu (RefClass(cWebMenuColumnRestorer)) "oColumnRestorer" to hoChild // A cWebMenuGroupingSelector to group columns at will if the cWebList allows it! Get CreateNamed of hoDefaultHeaderMenu (RefClass(cWebMenuGroupingSelector)) "oGroupingSelector" to hoChild // Finally the most important part being the context that the menu will serve, in this case a header right-click. Set peContext of hoDefaultHeaderMenu to C_WebUIContextListHead // For later reference set the property to the handle. Set phPrivateDefaultHeaderMenu to hoDefaultHeaderMenu End_Procedure