Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

insertAtCaret - current postion is altered when custom dialog closes

Last post 09-03-2008 9:08 by [Infragistics] Viktor Snezhko. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-16-2008 13:40

    insertAtCaret - current postion is altered when custom dialog closes

    Ho can I avoid the current postion of the cursor to be reset to the beginning after a custom dialog closes?

    I'm trying to add a new Item to the toolbar where I will ask my own questions, then the content of the field is to be added at the current position. The issue is that it adds it at the begining of the editor.

    I also noticed the use of a defaulted image, Can I set my own and how?

    thank you in advance

    Ronel

    • Post Points: 20
  • 09-03-2008 9:08 In reply to

    Re: insertAtCaret - current postion is altered when custom dialog closes

    Hi Ronel,

    The insertAtCaret is nothing more, but a wrapper for options of browser related to current selection. If text is inserted at the beginning of content, then it means that at that time browser has selection at that location.

    Every item of WebHtmlEditor can have its own image(s). If nothing is set, then name of image is assumed to be equal to the type of button. Like button Bold will have image "button.gif". You may modify images at design time within Toolbar.Items property. Select item which you want to modify on left side of dialog and within property-window which appears on right side of dialog enter values for ImageName, MouseOverImageName, MouseDownImageName.

    You also do that at run time. Example,

    Infragistics.WebUI.WebHtmlEditor.ToolbarButton button = this.WebHtmlEditor1.Toolbar.FindByKeyOrType(ActionType.Italic, null) as Infragistics.WebUI.WebHtmlEditor.ToolbarButton;

    button.ImageName = "./myImg.gif";

    Infragistics.WebUI.WebHtmlEditor.ToolbarButton button2 = this.WebHtmlEditor1.FindByKeyOrAction("Bold") as Infragistics.WebUI.WebHtmlEditor.ToolbarButton;

    button2.ImageName = "./myImg2.gif";

    Regards,
    Viktor
    Infragistics web team
    • Post Points: 5
Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems