This property sets or retrieves the ToolStripButton control displaying the "ClosePenLine" item on the ToolBarSetupLines control.
Property Value
A value of type System.Windows.Forms.ToolStripButton
Explanation
The ButtonClosePenLine property sets or retrieves the ToolStripButton control displaying the "ClosePenLine" item on the ToolBarSetupLines control.
Because the "ClosePenLine" button is a ToolStripButton control, you can use the ButtonClosePenLine property to change the "ClosePenLine" button settings, generate events, etc.
Please refer to the examples below.
Examples
(1) To change the image displayed in the "ClosePenLine" button
ToolBarSetupLines1.ButtonClosePenLine.Image = Image.FromFile("c:\images\button_img1.bmp")
[Visual C#.NET]
toolBarSetupLines1.ButtonClosePenLine.Image = Image.FromFile("c:\\images\\button_img1.bmp");
(2) Access the "StartArrowCapSizeUp" button's Click event.
Private Sub ToolBarSetupLines1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolBarSetupLines1.ItemClicked
If e.ClickedItem Is ToolBarSetupLines1.ButtonStartArrowCapSizeUp Then 'The button that was clicked is the "ButtonStartArrowCapSizeUp" button
'Write code here that you want to execute when the event fires
End If
End Sub
[Visual C#.NET]
private void toolBarSetUpLines1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
if (e.ClickedItem == toolBarSetUpLines1.ButtonStartArrowCapSizeUp)//The button that was clicked is the "ButtonStartArrowCapSizeUp" button
{
//Write code here that you want to execute when the event fires
}
}
(3) Access the "StartArrowCapSizeUp " button's MouseUp event.
'In the FormLoad event, set the ButtonStartArrowCapSizeUp delegate
AddHandler ToolBarSetupLines1.ButtonStartArrowCapSizeUp.MouseUp, AddressOf ButtonStartArrowCapSizeUp_MouseUp
'event handler delegate
Private Sub ButtonStartArrowCapSizeUp_MouseUp(ByVal sender As System.Object, ByVal e As System.EventArgs)
'Write code here that you want to execute when the event fires
End Sub
[Visual C#.NET]
//In the FormLoad event, set the ButtonStartArrowCapSizeUp delegate
toolBarSetUpLines1.ButtonStartArrowCapSizeUp.MouseUp += new MouseEventHandler(ButtonStartArrowCapSizeUp_MouseUp);
//event handler delegate
private void ButtonStartArrowCapSizeUp_MouseUp(object sender, EventArgs e)
{
//Write code here that you want to execute when the event fires
}
See Also
ToolBarSetupLines Members | Newtone.ImageKit.Win.ToolBarSetupLines