ToolStripDropDownButton stays selected after using colordialog

  • Thread starter Thread starter HotIndigo
  • Start date Start date
H

HotIndigo

Guest
I am using a ToolStripDropDownButton (defined as Tsdd_SelColour in this code to select a colordialog (defined as dlg_Colour in this code). After closing dlg_Colour, the Tsdd_SelColour button remains highlighted, as if the mouse is hovering on the control. If I move the mouse into any other button on the toolstrip, the highlight goes off. This is the basic code I use:

Private Sub Tsdd_SelColour_Click(sender As Object,
e As EventArgs) _
Handles Tsdd_SelColour.Click

Dim Result As DialogResult

Result = dlg_Colour.ShowDialog()

If Result = DialogResult.OK Then
' Do things
End If

Tsdd_SelColour.BackColor = Color.White

End Sub


I inserted the line Tsdd_SelColour.BackColor = Color.White in an attempt to clear the button selection but it does not work. Any suggestions as to how I could "unselect" the ToolStripDropDownButton?

P.S. As an aside, is there a colour dialog that opens up a colour selection like the one in Word or Excel?

HotIndigo.

Continue reading...
 
Back
Top