PDA

View Full Version : [CLOSED] ToolTip place not changing when view port is in RTL = true



mohan.bizbites
Nov 20, 2013, 5:36 AM
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


<%@ 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.CreateSpecificCul ture(Session["resource"].ToString());
System.Threading.Thread.CurrentThread.CurrentCultu re = ci;
System.Threading.Thread.CurrentThread.CurrentUICul ture = new System.Globalization.CultureInfo(Session["resource"].ToString());
}
}
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
if (System.Threading.Thread.CurrentThread.CurrentCult ure.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

Daniil
Nov 20, 2013, 6:26 AM
Hi Mohan,

It appears for me as on the screenshot. Is it wrong? If so, what is correct?

7234

mohan.bizbites
Nov 20, 2013, 6:47 AM
Hi Daniil,
Thanks for the reply ,
i have attached the my screen grab in both the languages please have a look 72367235

Daniil
Nov 20, 2013, 12:34 PM
What is the Ext.NET version you are testing with? If < 2.3, please try with v2.3.