C1Editor SetFocusAfterLoading

Posted by: pauld on 13 April 2018, 7:41 pm EST

    • Post Options:
    • Link

    Posted 13 April 2018, 7:41 pm EST

    The documentation for the C1Editor includes a property “SetFocusAfterLoading”.

    However, we don’t see it in the intellisense for the object.

    Our C1Editor version is: 4.0.20171.248.

    I think we are one version behind, but I didn’t see anything about the editor in the release notes.

    Thanks.

  • Posted 16 April 2018, 12:33 am EST

    Hello,

    The property SetFocusAfterLoading came up with 4.0.20173.286 builds, as can be seen in the particular ChangeLog. You can download the builds from the below mentioned link for further details:

    http://prerelease.componentone.com/dotnet40/c1winforms/2017-t3/C1WinForms.4_4.0.20173.286.zip

    Best Regards,

    Esha

  • Posted 16 April 2018, 12:03 pm EST

    Esha,

    Thanks for the reply.

    A further question, does SetFocusAfterLoading = true ONLY trigger focus after LoadRtf() or LoadXML() methods are called or will focus be set in other scenarios; for instance, when the control’s Test property is set?

    Thanks.

    – Paul

  • Posted 17 April 2018, 1:01 am EST

    Hello Paul,

    for instance, when the control’s Test property is set?

    Do you mean the Text property of the C1Editor, here?

    Yes, SetFocusAfterLoading when set to True, gets the focus to the C1Editor only when a document is loaded in it (as stated in the documentation). It does not work when the Text property of the C1Editor is set. However, you can always call the Focus method of C1Editor to get focus to it as soon as the Text property is set:

    private void button1_Click(object sender, EventArgs e)
          {
              c1Editor1.Text = "New val";
              c1Editor1.Focus();  
              
          }
    

    Let us know if you need further assistance.

    Best Regards,

    Esha

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels