Page tree
Skip to end of metadata
Go to start of metadata

Message Bar items are messages with an accompanying hyperlink that, when clicked, navigates the user to a location in the navigation tree.

Adding Message Bar items

Add a message bar item with NavInsertItem.

Items added in the manner shown above display the strLabel text as the message, followed by a link that says "Go There". If you click the link, the WMC navigates to the location specified in strDestination. You can provide a custom formatted message and link by specifying the NI_FLAG_MESSAGEBAR_CUSTOMMESSAGE  flag . See Custom link text.

 

The flags field of the NAVSETITEM structure dictates how the message bar item will be handled.

FlagDescription
NI_FLAG_MESSAGEBAR_ICONWARNING
NI_FLAG_MESSAGEBAR_ICONINFO
NI_FLAG_MESSAGEBAR_ICONSHIELD
The type of icon to show. Mutually exclusive.
NI_FLAG_MESSAGEBAR_NOTIFYNotify the item of the click as opposed to navigating to the location. Calls the NavItemNotify handler of the notification interface supplied in NavInsertItem, passing in the strDestination as the FQL. Without this flag the default behaviour is to go to a navigation location.
NI_FLAG_MESSAGEBAR_CUSTOMMESSAGE Specify to supply message text with an embedded link with customised text. See below for details.

Custom link text 

By default a message bar item contains user-supplied text followed by a hyperlink with the text Go There. You can supply a custom message that allows you to set the hyperlink text as well as place it anywhere within the message. To do so set the flag NI_FLAG_MESSAGEBAR_CUSTOMMESSAGE in flags field of the NAVSETITEM structure and provide a message in strLabel, enclosing the hyperlink portion in <a></a> tags. e.g.

 

 

  • No labels