Created
July 24, 2017 13:51
-
-
Save bjoerntx/88a405105cc6eb77fbd981a0cb8a61b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class Form1 : TXTextControl.Windows.Forms.Ribbon.RibbonForm | |
{ | |
public Form1() | |
{ | |
InitializeComponent(); | |
textControl1.InputPositionChanged += TextControl1_InputPositionChanged; | |
textControl1.FrameSelected += TextControl1_FrameSelected; | |
textControl1.FrameDeselected += TextControl1_FrameDeselected; | |
textControl1.DrawingActivated += TextControl1_DrawingActivated; | |
textControl1.DrawingDeselected += TextControl1_DrawingDeselected; | |
} | |
private void TextControl1_DrawingDeselected(object sender, | |
TXTextControl.DataVisualization.DrawingEventArgs e) | |
{ | |
if ((textControl1.Frames.GetItem() == null) && | |
(textControl1.Drawings.GetActivatedItem() == null)) | |
{ | |
m_grpFrameTools.Visible = false; | |
} | |
} | |
private void TextControl1_DrawingActivated(object sender, | |
TXTextControl.DataVisualization.DrawingEventArgs e) | |
{ | |
m_grpFrameTools.Visible = true; | |
} | |
private void TextControl1_FrameDeselected(object sender, | |
TXTextControl.FrameEventArgs e) | |
{ | |
if ((textControl1.Frames.GetItem() == null) && | |
(textControl1.Drawings.GetActivatedItem() == null)) | |
{ | |
m_grpFrameTools.Visible = false; | |
} | |
} | |
private void TextControl1_FrameSelected(object sender, | |
TXTextControl.FrameEventArgs e) | |
{ | |
m_grpFrameTools.Visible = true; | |
} | |
private void TextControl1_InputPositionChanged(object sender, EventArgs e) | |
{ | |
m_grpTableTools.Visible = textControl1.Tables.GetItem() != null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment