Bongo
Nov 13th, 2006, 03:48 AM
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
if (dropdownbutton.Image.Equals(Resources.Pic1))
{
dropdownbutton.Image = Resources.Pic2;
}
else
{
dropdownbutton.Image = Resources.Pic1;
}
does not work.
i am using now this methode
the Tag Property of the ToolStripDropDownButton becomes during design time the value "0"
if (dropdownbutton.Tag.Equals("1"))
{
dropdownbutton.Tag = "2";
dropdownbutton.Image = Resources.Pic2;
}
else
{
dropdownbutton.Tag = "1";
dropdownbutton.Image = Resources.Pic1;
}
There must be a better way ???
thx
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
if (dropdownbutton.Image.Equals(Resources.Pic1))
{
dropdownbutton.Image = Resources.Pic2;
}
else
{
dropdownbutton.Image = Resources.Pic1;
}
does not work.
i am using now this methode
the Tag Property of the ToolStripDropDownButton becomes during design time the value "0"
if (dropdownbutton.Tag.Equals("1"))
{
dropdownbutton.Tag = "2";
dropdownbutton.Image = Resources.Pic2;
}
else
{
dropdownbutton.Tag = "1";
dropdownbutton.Image = Resources.Pic1;
}
There must be a better way ???
thx