This commit is contained in:
@@ -44,12 +44,17 @@ namespace Volian.Controls.Library
|
||||
void _MyStepRTB_LinkChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = (_MyStepRTB.MyLinkText != null);
|
||||
if (btnCMGoTo.Enabled == true) // must have some link test, use it to set edit of transition or ro...
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; //(_MyStepRTB.MyLinkText != null);
|
||||
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition
|
||||
btnCMEditRO.Enabled = _MyStepRTB.MyLinkText.IndexOf("ReferencedObject") > -1; // selected link must be ro
|
||||
}
|
||||
else
|
||||
{
|
||||
btnCMEditTran.Enabled = false;
|
||||
btnCMEditRO.Enabled = false;
|
||||
}
|
||||
}
|
||||
void MyStepRTB_Leave(object sender, EventArgs e)
|
||||
{
|
||||
@@ -81,12 +86,17 @@ namespace Volian.Controls.Library
|
||||
btnCMPaste.Enabled = btnPaste.Enabled = (iData.GetDataPresent(DataFormats.Text) || iData.GetDataPresent(DataFormats.Rtf));
|
||||
|
||||
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = (_MyStepRTB.MyLinkText != null);
|
||||
if (btnCMGoTo.Enabled == true) // must have some link test, use it to set edit of transition or ro...
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.SelectionProtected; //(_MyStepRTB.MyLinkText != null);
|
||||
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition")>-1; // selected link must be a transition
|
||||
btnCMEditRO.Enabled = _MyStepRTB.MyLinkText.IndexOf("ReferencedObject") > -1; // selected link must be ro
|
||||
}
|
||||
else
|
||||
{
|
||||
btnCMEditTran.Enabled = false;
|
||||
btnCMEditRO.Enabled = false;
|
||||
}
|
||||
}
|
||||
public StepTabRibbon()
|
||||
{
|
||||
|
Reference in New Issue
Block a user