Hi People,
If any one can help me out on this.
I am working on a Winform application , .Net 3.5
I have Toolstrip control and then sub Toolstrip in sub Toolstrip I have to get its text when it is clicked.
Toolstrip -->File-->List-->Items
I want text of any Item present in the list.
Here List of Items are dynamicaly generated so I dont know the name of the Item.
Loading
Deepak GoyalPosted May 20, 2012, 11:01 AM
I am able to solve by this way,
public void toolStripMenuItem1_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
string clickedtext = e.ClickedItem.Text;
MessageBox.Show(clickedtext );
}Kunal VaishyaPosted May 19, 2012, 11:46 PM
ToolStripItem objitm;
objitm = (ToolStripItem)sender;
MessageBox.Show(objitm.Text);
on click event
Deepak GoyalPosted May 19, 2012, 11:20 AM
Kunal VaishyaPosted May 19, 2012, 2:51 AM
ToolTip tl1 = new ToolTip();
tl1.SetToolTip(button1, "This is testing");
Button1 is control you can set any control