Solved

A question about mirroring that is required for multi-language applications

Posted on 2003-10-21
8
232 Views
Last Modified: 2010-04-17
A question about mirroring that is required for multi-language applications,
where some languages are read from right to left rather than left to right
(Arabic is an example).
How can I reverse the presentation of text strings, or even better, reverse
(or mirror) the entire UI if possible for complete consistency.
My application is written on VB6.

Thanks in advance
0
Comment
Question by:NatalieEng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 41

Expert Comment

by:graye
ID: 9593051
Forms and most ActiveX controls on VB6 support the "RightToLeft" property, which will do what you want.  In VB6 it's called "bi-directional" programming

BTW: VB.Net has much better support for these kinds of globalization features.
0
 

Author Comment

by:NatalieEng
ID: 9597803
Thanks, but if the RightToLeft property of a specific form is set to True, several actions occur:

1. Menus and their associated command names (or items) are right-aligned with RTL reading order. They appear at the right edge of the form in an overall RTL layout.
2. Form captions have an RTL reading order and are right-aligned in the title bar.
3. Any text that the Print method prints to the form will begin at the right boundary of the form and have RTL reading order.
4. Set to true the default RightToLeft property value for newly added controls that have a RightToLeft property.

My problem is what about controls that are already in the form? how can I change their default RightToLeft property value automatically, and not one by one?
0
 
LVL 41

Expert Comment

by:graye
ID: 9598389
Hummm....  I guess you'd just have to run thru the controls collection and set them as you go..

Private Sub Form_Load()
    Dim c As Control
   
    Form1.RightToLeft = True
    For Each c In Form1.Controls
        c.RightToLeft = True
    Next
   
End Sub
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:NatalieEng
ID: 9599999


_______
|
0
 

Author Comment

by:NatalieEng
ID: 9600347
I want to explain myself better.
I need exactly mirror form of my "Form". For example:

original form:
_________________________________
| __________                                      |
| |TextBox     |            Label                  |
| |_________|                                      |
|________________________________|

Mirror form:

_________________________________
|                                      __________ |
|               Label               |     TextBox| |
|                                      |_________| |
|________________________________|

RightToLeft property cannot do that.
Is there a function or add-in of some sort that can do that? It will really help me!

Thanks in advance.

0
 
LVL 41

Accepted Solution

by:
graye earned 125 total points
ID: 9600638
Oh!

OK... no, there's nothing really that can help with that kind of setup... You could hard-code the upper-lefthand corner locations in an array, and switch the locations in code... but that's pretty hokey.

Once Again, VB.Net can be of tremendous help in this regard, since you can create multiple version of a single GUI based upon Locale and have the correct one display automatically based upon the client's PC settings.
0
 

Author Comment

by:NatalieEng
ID: 9605123
OK

I'll try to find a different way to do it.

Thanks anyway.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question