:: Forum >> Version 1 >>
Right to left direction,
Using Persian language on Iranian websites , we have to change the page direction to right to left usng tags like this :
<div dir=rtl>
or even
<html dir=rtl>
but RTL ( right to left ) direction does not work on the ActiveWidgets grid properly. ( test it ) what is the soloution ?!
Amin
Sunday, September 19, 2004
I was trying to make right-to-left working with the grid but without success. So far there is no solution.
Alex (ActiveWidgets)
Sunday, September 19, 2004
I have problem with right to left direction for ActiveWidgets grid
HH
Saturday, February 5, 2005
With the current version right-to-left is not supported. I will keep it as requirement for version 2.0
Alex (ActiveWidgets)
Saturday, February 5, 2005
Hi,
Is right-to-left supported now ?? I worked on for sometime but didn't succeed.
Thank you so much.
Fuad
Tuesday, January 3, 2006
Fuad jan,
Add this style to your right-to-left column:
text-align: right; direction:rtl;
It shows the UTF-8 data (in this case Persian text) correctly but there is a problem when user wants to change header witdh of the rtl column, the right border of the header is not available to grab.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ActiveWidgets Grid :: Examples</title>
<style> body, html {margin:0px; padding: 0px; overflow: hidden;} </style>
<!-- ActiveWidgets stylesheet and scripts -->
<link href="../../runtime/styles/xp/grid.css" rel="stylesheet" type="text/css" ></link>
<script src="../../runtime/lib/grid.js"></script>
<!-- grid format -->
<style>
.active-controls-grid {height: 100%; font: menu;}
.active-column-0 {width: 80px;}
.active-column-1 {width: 200px; text-align: right; direction:rtl;}
.active-column-2 {text-align: right;}
.active-column-3 {text-align: right;}
.active-column-4 {text-align: right;}
.active-grid-column {border-right: 1px solid threedlightshadow;}
.active-grid-row {border-bottom: 1px solid threedlightshadow;}
</style>
<!-- grid data -->
<script>
var myData = [
["MSFT","دود ما را خواهد برد", "314,571.156", "32,187.000", "55000"],
["ORCL", "موتور ملي بر روي ۱۴ خودرو به‌طور آزمايشي نصب شد", "62,615.266", "9,519.000", "40650"],
["SAP", "اساسنامه شركت ملي نفت امسال به مجلس ارايه مي‌شود", "40,986.328", "8,296.420", "28961"],
["CA", "راه چاره حمل و نقل عمومي است", "15,606.335", "3,164.000", "16000"]
];
var myColumns = [
"Ticker", "Company Name", "Market Cap.", "$ Sales", "Employees"
];
</script>
</head>
<body>
<script>
// create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;
// set number of rows/columns
obj.setRowProperty("count", 4);
obj.setColumnProperty("count", 5);
// provide cells and headers text
obj.setDataProperty("text", function(i, j){return myData[i][j]});
obj.setColumnProperty("text", function(i){return myColumns[i]});
// set headers width/height
obj.setRowHeaderWidth("28px");
obj.setColumnHeaderHeight("20px");
// set click action handler
obj.setAction("click", function(src){window.status = src.getItemProperty("text")});
// write grid html to the page
document.write(obj);
</script>
</body>
</html>
yamyam
Tuesday, January 3, 2006
After posting the example I see that the Unicode text is messed up. It is supposed to be unicode data, so replace that.
For those who dont have any unicode language setup on ther pc , copy paste come text from this site:
http://www.irangreenpen.org/ to myData[]
yamyam
Tuesday, January 3, 2006
This topic is archived.
Back to support forum
Forum search