Urgent requirement!!!

Last post 11-04-2005, 12:34 PM by Pintod. 6 replies.
Sort Posts: Previous Next
  •  11-03-2005, 4:48 PM 12239

    Urgent requirement!!!

    Hi Adam :
    We have the requirement of adding custom label to the toolbar. The intention is to show the character count in the toolbar. The following are the changes I did but it didn't seem to work and render the label on runtime. We are using version 5.0. We have a custom config file like this:

    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
     <contextmenu>
      <!--<item name="Editing" value="True"/>
      <item name="Format" value="True"/>
      <item name="Insert" value="True"/>
      <item name="InsertAdvanced" value="True"/>
      <item name="InsertFiles" value="True"/>
      <item name="InsertForms" value="True"/>
      <item name="Relative" value="True"/>
      <item name="Tags" value="True"/>
      <item name="Verbs" value="True"/>-->
     </contextmenu>
     <toolbars>
      <item type="g_start" />
      <item type="image" name="Cut" />
      <item type="image" name="Copy" />
      <item type="image" name="Paste" />
      <!--
      <item type="image" name="PasteText" />
      <item type="image" name="PasteWord" />
      -->
      <item type="image" name="Delete" />
      <!--
      <item type="separator" />
      <item type="image" name="Find" />
      -->
      <item type="separator" />
      <item type="image" name="Undo" />
      <item type="image" name="Redo" />
      <item type="separator" />
      <item type="image" name="Bold" />
      <item type="image" name="Italic" />
      <item type="image" name="Underline" imagename="under" />
      <item type="separator" />
      <item type="forecolor" />
      <item type="backcolor" />
      <item type="separator" />
      <item type="holder" name="MyHolderName" />
      <item type="g_end" />
      </toolbars>
    </configuration>
     
     
     
     
    Server side code:

    Label B1 = new Label();

    B1.Text="Test";

    NoteEditor.ToolControls["MyHolderName"].Control.Controls.Add(B1);

    I cannot see the PlaceHolder nor the label being generated. What can be done to fix this?? I even want to set the id of the control in this case 'B1' on server side so on client side I can change the text of the control.
    Another issue is that cuteeditor does not steal focus from the page - that problem was resolved in v 5.0 but we still find that problem in this that version- when loading aspx page with cuteEditor in multiple iframes the scroll bar keeps jumping around, do you have any fix for this.
     
     
    Thanks in advance,
     
    Don P.
  •  11-03-2005, 5:07 PM 12243 in reply to 12239

    Re: Urgent requirement!!!

    Don,
     
    Please check this example:
     
    http://cutesoft.net/example/howto/RegisterCustomButton/cs/RegisterCustomButton.aspx

    >>  <item type="holder" name="MyHolderName" />

    Please don't change the holder name.

    <item type="holder" name="insertcustombutonhere" />

    Another suggestion is:

      CuteEditor.ToolControl tc = OuterEditor.ToolControls["insertcustombutonhere"];
      if(tc!=null)
      {    
       System.Web.UI.WebControls.Image Image1 = new System.Web.UI.WebControls.Image ();
       Image1.ToolTip    = "Close";
       Image1.ImageUrl    = "../Themes/custom/images/close.gif";
       Image1.CssClass    = "CuteEditorButton";
       SetMouseEvents(Image1);
       Image1.Attributes["onclick"]="top.returnValue=null; self.close();";
       
       System.Web.UI.WebControls.Image Image2 = new System.Web.UI.WebControls.Image ();
       Image2.ToolTip    = "Add uneditable regions";
       Image2.ImageUrl    = "../Themes/custom/images/noneditable.gif";
       Image2.CssClass    = "CuteEditorButton";
       SetMouseEvents(Image2);
       Image2.Attributes["onclick"]="CuteEditor_GetEditor(this).ExecCommand('noneditable');";
       
       tc.Control.Controls.Add(Image2);
       tc.Control.Controls.Add(Image1);
      }

    Keep me posted


      


     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-04-2005, 9:34 AM 12262 in reply to 12243

    Re: Urgent requirement!!!

    Hi Adam :
     
         I still can't see any image or html control being rendered. I changed the holder tag back to the original name and used the code you gave me - still does not work. Is there any property I need to turn on. I am using custom config file.
     
    Thanks and looking forward for your quick reply.
     
    Don.
  •  11-04-2005, 11:41 AM 12273 in reply to 12262

    Re: Urgent requirement!!!

    Any fix found??????
  •  11-04-2005, 11:44 AM 12276 in reply to 12273

    Re: Urgent requirement!!!

  •  11-04-2005, 11:45 AM 12277 in reply to 12276

    Re: Urgent requirement!!!

    The source code of the above example is included in the download package.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-04-2005, 12:34 PM 12280 in reply to 12277

    Re: Urgent requirement!!!

    I tried the code snippet you provided me earlier and it does not work. I sent you our config file in my previous message  and I changed the name of the holder as you said. Can you try the holder method and provide me with serverside code. I want to render a label not a button.
     
    Let me know if you need any more information.
    Thanks,
     
    Don P.
View as RSS news feed in XML