Minitoolbar update

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to built a minitoolbar that will need to udate the label.
My minitoolbar is defined, I have a label, then a button. When I select the button, an other dialog box appear and I can change a text. That text is saved in my my.settings... That work fine.
Then I try to do a m_minitoolbar.controls(1).displayname and change it with a different text, but nothing changed on the toolbar on the screen... Is there a way to update it. Do I need to remove the toolbar and create a new one...
Sub question: is there a way in a minitoolbar to have a textbox, I would like the user to be able to type-in some text. It's not a value box, as there no dimensions, but just text?
Public Sub CreateMiniToolBar()
Try
m_MiniToolbar = invApp.CommandManager.CreateMiniToolbar
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
Dim miniControls As MiniToolbarControls = m_MiniToolbar.Controls
miniControls.AddLabel("idLabel", "Current: " + My.Settings.Prefix _
, "Prefix of the occurence to remove material from")
m_button1 = miniControls.AddButton("id_btnPrefix", "Change", "Change the prefix to use")
' this button is showing a dialogbox and on exiting it's calling MiniToolBarChangeLabel
m_MiniToolbar.Visible = True
End Sub
Private Sub MiniToolBarChangeLabel()
m_MiniToolbar.Controls(1).DisplayName = "Prefix: " + My.Settings.Prefix
End Sub