The Artima Developer Community
Sponsored Link

.NET Buzz Forum
TreeView in Arabic

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dan Fernandez

Posts: 456
Nickname: danielfe
Registered: Aug, 2003

Daniel Fernandez is the Product Manager for C# in the developer division at Microsoft.
TreeView in Arabic Posted: Feb 4, 2004 9:44 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Dan Fernandez.
Original Post: TreeView in Arabic
Feed Title: Dan Fernandez's Blog
Feed URL: /msdnerror.htm?aspxerrorpath=/danielfe/Rss.aspx
Feed Description: Dan discusses Dot Net.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Dan Fernandez
Latest Posts From Dan Fernandez's Blog

Advertisement

In the Q&A after my ASP.NET talks at MDC, someone asked whether the new ASP.NET 2.0 TreeView control can render nodes and subnodes in languages that read from right to left like Arabic.  I tried testing this by dropping a TreeView control and looked for *some* property that would let me use character sets that read right-to-left, but didn't find anything close.  So I forwarded this question onto Goldfarb, who forwarded it onto Brad Millington, who forwarded it to the person that owns testing the Treeview, and as it turns out this is possible (and that we do test for it) but it's not an inherent property in the Treeview control.

Aside:  Almost everyone at Microsoft is on email *all* the time, so while it may seem like a convoluted process to get three or five or ten degrees of indirection to get a question answered, it could be as short as five minutes for a fully-validated response with VP approval. I love this company :)

So how do you do it? Rather then setting a property on a control, you set the “dir“ property on the page, (or to be more specific the body) which will then render the  content right to left.  But what if you wanted to have multi-directional content on a single page, like a navbar that is right to left in arabic, but content that is left to right in English? And what if you didn't want to use frames (floating or otherwise)? 

Step 1 Define a navbar/master page

Create the nav bar the same way you always would, in <td></td>, <span></span>, <div></div> or whatever tags you use for positioning, and set the dir property in the <td>,<span> or <div> tags to “rtl”.

Step 2 Define the content area for the page

Create the content area for the page and set the dir property to “ltr

 

Read: TreeView in Arabic

Topic: Software that makes your life with a Creative Zen easier Previous Topic   Next Topic Topic: Microsoft releases metadata removal tool

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use