Hi
I have a
- StatusStrip with a ToolStripDropDownButton
- ToolStripDownButton Property is set to "Image and Text"
- Resourcefile with to pictures (Pic1 and Pic2)
assign during designmode a Image from the resource file called Pic1 to the property Image
during the run this Image has to be changed so i did
VB Code:
if (dropdownbutton.Image.Equals(Resources.Pic1))
{
[INDENT]dropdownbutton.Image = Resources.Pic2;[/INDENT]
}
else
{
[INDENT]dropdownbutton.Image = Resources.Pic1;[/INDENT]
}
does not work.
i am using now this methode
the Tag Property of the ToolStripDropDownButton becomes during design time the value "0"
VB Code:
if (dropdownbutton.Tag.Equals("1"))
{
[INDENT]dropdownbutton.Tag = "2";[/INDENT]
[INDENT]dropdownbutton.Image = Resources.Pic2;[/INDENT]
}
else
{
[INDENT]dropdownbutton.Tag = "1";[/INDENT]
[INDENT]dropdownbutton.Image = Resources.Pic1;[/INDENT]
}
There must be a better way ???
thx