Topbar
Topbar
Sign in
|
Join
|
Client Center
Home
Products
Client Center
Contact
Purchase
Support forums
»
Products
»
Cute Editor for .NET
»
Re: change toolbar image
change toolbar image
Last post 06-30-2009, 3:36 AM by
goh6613
. 4 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
06-28-2009, 11:18 PM
53573
goh6613
Joined on 12-17-2008
Posts 74
change toolbar image
Reply
Quote
hi
how can i replace the toolbar image with my own image ?
thanks
06-29-2009, 7:47 AM
53583
in reply to
53573
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: change toolbar image
Reply
Quote
Hi goh6613,
You can create a custom button to do the same function and use your own image.
Demo
http://cutesoft.net/example/customization.aspx
Regards,
Ken
06-29-2009, 7:44 PM
53610
in reply to
53583
goh6613
Joined on 12-17-2008
Posts 74
Re: change toolbar image
Reply
Quote
hi
if i want to remain the toolbar function, but just want to change the image,
is it possible ? and how can i do that ?
I trying to change "Insert Layer" image, can someone help me in this ?
thanks
06-29-2009, 8:51 PM
53612
in reply to
53610
Kenneth
Joined on 02-13-2008
Posts 3,886
Re: change toolbar image
Reply
Quote
Hi goh6613,
Try this example
<%@ Page Language=
"C#"
%>
<%@ Register TagPrefix=
"CE"
Namespace=
"CuteEditor"
Assembly=
"CuteEditor"
%>
<html>
<head>
<title>Add custom buttons</title>
</head>
<script runat=
"server"
>
void
Page_Load(
object
sender, System.EventArgs e)
{
CuteEditor.ToolControl tc = Editor1.ToolControls[
"insertcustombutonhere"
];
if
(tc !=
null
)
{
System.Web.UI.WebControls.Image Image1 =
new
System.Web.UI.WebControls.Image();
Image1.ToolTip =
"Insert a layer"
;
//put a image under the root of your site, and name tools.gif
//if you want to use another path and name, just change Image1.ImageUrl
Image1.ImageUrl =
"tools.gif"
;
Image1.CssClass =
"CuteEditorButton"
;
SetMouseEvents(Image1);
Image1.Attributes[
"onclick"
] =
" CuteEditor_GetEditor(this).ExecCommand('InsertLayer')"
;
tc.Control.Controls.Add(Image1);
}
}
void
SetMouseEvents(WebControl control)
{
control.Attributes[
"onmouseover"
] =
"CuteEditor_ButtonCommandOver(this)"
;
control.Attributes[
"onmouseout"
] =
"CuteEditor_ButtonCommandOut(this)"
;
control.Attributes[
"onmousedown"
] =
"CuteEditor_ButtonCommandDown(this)"
;
control.Attributes[
"onmouseup"
] =
"CuteEditor_ButtonCommandUp(this)"
;
control.Attributes[
"ondragstart"
] =
"CuteEditor_CancelEvent()"
;
}
</script>
<body>
<form id=
"Form1"
runat=
"server"
>
<CE:Editor ID=
"Editor1"
EditorWysiwygModeCss=
"../example.css"
Height=
"200"
runat=
"server"
TemplateItemList=
"Bold,Italic,Underline,JustifyLeft,JustifyCenter,JustifyRight,InsertUnorderedList,Separator,Indent, Outdent, insertcustombutonhere"
>
</CE:Editor>
</form>
</body>
</html>
Regards,
ken
06-30-2009, 3:36 AM
53623
in reply to
53612
goh6613
Joined on 12-17-2008
Posts 74
Re: change toolbar image
Reply
Quote
thanks kenneth