Nov 20, 2013, 4:36 AM
[CLOSED] ToolTip place not changing when view port is in RTL = true
Hello Team ,
In the below page we have a tooltip for a button, the tooltip is displaying in a correct position if it is in enlighs. If we change the language to arabic by using the dropdown in the page, the tooltip is displaying in the wrong position.
Please run the code and let us know your thoughts.....
Here is the sample code Default.aspx
Mohan
In the below page we have a tooltip for a button, the tooltip is displaying in a correct position if it is in enlighs. If we change the language to arabic by using the dropdown in the page, the tooltip is displaying in the wrong position.
Please run the code and let us know your thoughts.....
Here is the sample code Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Test_Default" Culture="auto" meta:resourcekey="PageResource1" UICulture="auto" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script runat="server">
protected override void InitializeCulture()
{
base.InitializeCulture();
if (Session["resource"] != null)
{
System.Globalization.CultureInfo ci = System.Globalization.CultureInfo.CreateSpecificCulture(Session["resource"].ToString());
System.Threading.Thread.CurrentThread.CurrentCulture = ci;
System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(Session["resource"].ToString());
}
}
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
if (System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.IsRightToLeft) { vp1.RTL = true; } else { vp1.RTL = false; }
}
protected void Page_Load(object sender, EventArgs e)
{
}
protected void cmdLangSelection_chnage(object sender, DirectEventArgs e)
{
Ext.Net.ListItem item = cmdLangSelection.SelectedItem;
if (item != null)
{
Session["resource"] = item.Value;
Response.Redirect(Request.RawUrl);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="RM" runat="server" IsDynamic="False"></ext:ResourceManager>
<div>
<ext:Viewport ID="vp1" runat="server" IDMode="Explicit" IsDynamic="False" Namespace="App" RenderXType="True">
<Items>
<ext:Panel Title="LanguageSelection" ID="paneltop" Region="North" runat="server" >
<Items>
<ext:ComboBox ID="cmdLangSelection" runat="server" EmptyText="Select Language Here" >
<Items>
<ext:ListItem Text="English" Value="en-GB"></ext:ListItem>
<ext:ListItem Text="Arabic" Value="ar-IQ"></ext:ListItem>
</Items>
<DirectEvents>
<Change OnEvent="cmdLangSelection_chnage"></Change>
</DirectEvents>
</ext:ComboBox>
</Items>
</ext:Panel>
<ext:Panel ID="PanelContent" Region="East" runat="server" Title="east panel" Collapsible="true" >
<Items>
<ext:Container ID="cn1" runat="server">
<Items>
<ext:Button ID="b1" runat="server" Text="test" ToolTip="testtooltip" ></ext:Button>
</Items>
</ext:Container>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</div>
</form>
</body>
</html>
Thanks in advance Mohan
Last edited by Daniil; Nov 26, 2013 at 6:36 AM.
Reason: [CLOSED]