PDA

View Full Version : [CLOSED] Extra Icon in Panel Header



Mario
Nov 23, 2014, 5:51 PM
I need to show an Star Icon on Header Panel... to right position.
The "star icon" must to be cliccable.

http://forums.ext.net/attachment.php?attachmentid=16471&stc=1

Can you help me?

Tnx!

Daniil
Nov 24, 2014, 4:17 PM
Hi Mario,

I can suggest this solution.

Example

<%@ Page Language="C#" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (!X.IsAjaxRequest)
{
X.ResourceManager.RegisterIcon(Icon.Accept);
}
}
</script>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Ext.NET v2 Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Panel runat="server" Title="Title" Width="200">
<HeaderConfig TitlePosition="0">
<Items>
<ext:Component runat="server" Flex="1" />
<ext:Button runat="server" Icon="Star" Handler="alert('Clicked');" />
</Items>
<Listeners>
<BeforeRender Handler="this.iconCls = 'icon-accept';
this.initIconCmp();
this.insert(0, this.iconCmp);" />
</Listeners>
</HeaderConfig>
</ext:Panel>
</form>
</body>
</html>