Hello
Basicaly it works but I still have a problem. I cannot create the tooltip associated to the panel. I work in vb and not in C# and all I try to create my tooltip conduct to an undefined object in JS. Here the code I use to create my tooltip (in the same time as the panel):
Dim ChartTip As New Ext.Net.ToolTip
ChartTip.ID = "tip" + ChartsToDraw
ChartTip.AutoHide = "false"
ChartTip.Closable = "true"
ChartTip.Draggable = "true"
ChartTip.Html = "Click the X to close tip on pan" + ChartsToDraw
MyPanel.Controls.Add(ChartTip)
I think problem is on the last line. I try, Me.Controls.Add(ChartTip), MyWindows.Controls.Add(ChartTip) (I have a window definition just above to add the panel to), but nothing works. In the same time, I will try to work on a simple example in VB to look for.
Edit:
It works. I render the tip to the window: here the code of the function:
<DirectMethod(ShowMask:=True, Msg:="Server is building charts, please wait")> Public Sub BuildPanelByDirectMethod(ByVal Title As String, ByVal Left As Double, ByVal Top As Double, ByVal ChartsToDraw As String, ByVal Width As Double, ByVal Height As Double)
Userparameters = GlobalFunction.ReadUserDataFromCookie(Request.Cookies("User"))
Dim INT_idRmdEntity As Integer = Userparameters.idRmdEntities
Dim myWindow As Ext.Net.Window = MyDesktop.Modules("Dashboard").Window(0)
Dim MyPanel As New Ext.Net.Panel
Dim myChart As New Ext.Net.Chart
Dim ChartTip As New Ext.Net.ToolTip
ChartTip.ID = "tip" + ChartsToDraw
ChartTip.AutoHide = "false"
ChartTip.Closable = "true"
ChartTip.Draggable = "true"
ChartTip.Html = "Click the X to close tip on pan" + ChartsToDraw
ChartTip.Render(myWindow)
myChart = BuildChart(ChartsToDraw, False)
MyPanel.ID = "pan" + ChartsToDraw
MyPanel.Title = Title
MyPanel.Layout = "Fit"
MyPanel.Height = CType(Height, Integer)
MyPanel.Width = CType(Width, Integer)
MyPanel.X = CType(Left, Integer)
MyPanel.Y = CType(Top, Integer)
MyPanel.Listeners.AfterRender.Handler = "ShowPanelTip('" + MyPanel.ID + "', '" + ChartTip.ID + "');"
MyPanel.Items.Add(myChart)
MyPanel.Render(myWindow)
End Sub
and in the javasscript call after panel is rendered:
var ShowPanelTip = function (pan, tip)
{
Ext.getCmp(tip).setTarget(Ext.getCmp(pan).header.getEl());
}