I have a WebToolbar with a range of buttons and one menu (with the Tag “Services”) already on it. I want to retrieve the WebToolbarButton for the menu, so I can re-populate the values on it.
I know how to remove the existing menu items from the WebToolbarButton menu and I know how to add the new menu items on, but I don’t know how to retrieve the WebToolbarButton for the menu based on its Tag.
'In the Open Event
Var tempWebToolbarButton As New WebToolbarButton
tempWebToolbarButton.Style = WebToolbarButton.ButtonStyles.Menu
tempWebToolbarButton.Caption = "Services"
tempWebToolbarButton.Tag = "Services"
WinTimeBillIt.MainToolbar.AddItem(tempWebToolbarButton)
'later in another Method
Var tempWebToolbarButton As New WebToolbarButton
'this retrieves a ToolBarMenuItem, but not the WebToolbarButton
tempWebToolbarButton = WinTimeBillIt.MainToolbar.ItemWithTag("Services") '<< error here
I don’t want to wait until the WebToolbarButton is Pressed. I know the few times I need to refresh the menu items.
I can determine the WebToolbarItem using WebToolbar.ItemWithTag(“Services”), but I am not sure how to turn this into a WebToolbarButton so I can update its menu items.
and then items below, I can not retrieve if some has bushed the Products Button in the toolbar, it “only” opens the menu, so there is apparently no differentiation between the little arrow next to the Products-Button (to open the menu) and the whole button as such …
Var tempWebToolbarItem As WebToolbarItem = WinLogin.LoginToolbar.ItemWithTag("Services")
Var tempWebToolbarButton As WebToolbarButton
If tempWebToolbarItem IsA WebToolbarButton Then
tempWebToolbarButton = WebToolbarButton(tempWebToolbarItem)
End If