Hadi Eskandari (gravatar)

RightToLeft in DevExpress Controls (DXperience) Wednesday, April 25, 2007

I found a post in DevExpress blog announcing they WON'T be adding RTL feature in near future! Now, that's a shame! With all the oil dollars being spent in middle east DevExpress team says they're not going to add RTL feature because it simply wouldn't worth their while! For more info on this check this link out :

http://community.devexpress.com/blogs/ctodx/archive/2006/12/13/554.aspx

A while a go, I was trying to add Right-To-Left feature to this suite, which is the only feature - In my idea - that is not provided. I've progressed a lot considering the work to be done and being single-handed! Although each and every control is not revised, (I don't need some of their controls for now), Editors and Utils project are working fully in RTL now (except for Tab control in Utils project).

Take a look at the screenshots below. Note that all the built-in devexpress captions (e.g. Ok, Cancel, internal ToolTips, Tab header captions, Calculator buttons, etc.) are localizable too.


Main View



List Editors



ImageComboBoxEdit



CalcEdit



ColorEdit




LookupEdit





Filed under
Feed Delicious Diggit Reddit Stumble
18 Comments
  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Sure...send your email at h dot eskandari at gmail.

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Hi Hadi

    Interesting stuff!

    We have been using DevExpress controls now for a couple of years and now have an opportunity to sell into the middle east market and so really need RTL support. However, a recent email to DevExpress has once again confirmed that there is little chance of RTL support being included in the near/mid future.

    I can see that you managed to change the DevExpress code to support RTL for some controls, and whilst having to change their code is not something we really want to do, I'd be interested to know how easy you found it and the sort of timescales involved

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Chris,

    In a matter of 3-4 weeks I could manage to fix RTL issues in all controls resided in Utils and Editors projects. By doing this, other projects such as Grid partially supported RTL because they inherently reused existing corrected functionality. Working on Grid control can get much hairy as it is more complex.

    With their latest release and rearcitechture, I think there MIGHT be ways to do this without touching their code (by subclassing the controls and replacing the drawing parts).

    Hope this helps

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Hadi, thanks for the feedback.

    I was wondering whether you have an email address I can contact you on. I would like to explore in more detail what you have done and perhaps how you might help is if that's OK?

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Dear Hadi,
    Did you change the source code of DevExpress to make some components support RTL?

    Thanks

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Hi, How did you do it ??

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Hi,

    I've changed the DevExpress sources in order to do so. That's the only (decent) way to do it. The only problem is that you need to do it all over again when they release a new version.

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    DevExpress is not alone in this case. Some components of ComponentOne have the same problem. I used ComponentOne for several years. Report Component is the best around the world but RTL is not supported in both windows and web version.

  • Hadi Eskandari (gravatar)

    HEskandari said
    September 16, 2009

    Actually, I have worked with C1 report. Although it has some shortcomings with RTL, I managed to make it work with some workarounds, in an enterprise Web application using ASP.NET, and also some WinForm applications. With all the problems of C1 with RTL, IMHO it is still the best there is to be used in RTL oriented applications.

  • Mohamed Salah (gravatar)

    Mohamed Salah said
    December 14, 2009

    how I can change the RTL in devexpress which classes in source code plz I need it thank you

  • Abdullah (gravatar)

    Abdullah said
    January 09, 2010

    Very nice work, please send my the source, becouse I try to make it RTL but I fail, I use the code below and it change every thing, but the skin is not that good and some controls have problem with postions of it's internal controls: ====================== using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using DevExpress.XtraEditors.Controls; namespace DevExpress.XtraGrid.Demos { public class rtlPageControl : DevExpress.XtraTab.XtraTabControl { const int WS_EX_LAYOUTRTL = 0x400000; private bool _mirrored = false; [Description("Change to the right-to-left layout."), DefaultValue(false), Localizable(true), Category("Appearance"), Browsable(true)] //MLHIDE public bool Mirrored { get { return _mirrored; } set { if (_mirrored != value) { _mirrored = value; this.Refresh(); base.OnRightToLeftChanged(EventArgs.Empty); } } } protected override CreateParams CreateParams { get { if (this.Mirrored) { CreateParams CP; CP = base.CreateParams; CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL; return CP; } else { return base.CreateParams; } } } } public class rtlNavBar : DevExpress.XtraNavBar.NavBarControl { const int WS_EX_LAYOUTRTL = 0x400000; const int WS_EX_RTLREADING = 0x2000; private bool _mirrored = true; [Description("Change to the right-to-left layout."), DefaultValue(false), Localizable(true), Category("Appearance"), Browsable(true)] //MLHIDE public bool Mirrored { get { return _mirrored; } set { if (_mirrored != value) { _mirrored = value; this.Refresh(); base.OnRightToLeftChanged(EventArgs.Empty); } } } protected override CreateParams CreateParams { get { if (this.Mirrored) { CreateParams CP; CP = base.CreateParams; CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL | WS_EX_RTLREADING; return CP; } else { return base.CreateParams; } } } } public class rtlGrid : DevExpress.XtraGrid.GridControl { const int WS_EX_LAYOUTRTL = 0x400000; const int WS_EX_RTLREADING = 0x2000; private bool _mirrored = true; [Description("Change to the right-to-left layout."), DefaultValue(false), Localizable(true), Category("Appearance"), Browsable(true)] //MLHIDE public bool Mirrored { get { return _mirrored; } set { if (_mirrored != value) { _mirrored = value; this.Refresh(); base.OnRightToLeftChanged(EventArgs.Empty); } } } protected override CreateParams CreateParams { get { if (this.Mirrored) { CreateParams CP; CP = base.CreateParams; CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL | WS_EX_RTLREADING; return CP; } else { return base.CreateParams; } } } } } =================================

  • Abdullah, Mohamed Salah, The change is in the source code of DevExpress components. It is tremendous amount of work, not just changing a few lines of code. Furthermore, I can not send you the code, because the version I worked on is old (a build for 2006) and send you the source code of DevExpress is against the copyright. If you're working on a new project, try DevExpress WPF controls. Thanks to WPF engine, the right to left layout is working great.

  • parisa (gravatar)

    parisa said
    April 05, 2010

    hi

    mitunam beporsam chetori in kar ro kardin?

  • parisa (gravatar)

    parisa said
    April 05, 2010

    agar baratun maghdore ma mitunim control ha ro bezharim

  • Manuel (gravatar)

    Manuel said
    May 05, 2010


    Hola, estoy muy interesado en RTL para los controles de DevExpress, de verdad me parece vergonzoso que no tengan pensado desarrollar esta funcionalidad.

    Incluso estabamos pensando en desarrollarla nosotros mismos, me puedes enviar información de como lo has realizado tu?

    Un saludo y muchas gracias
     

  • Manuel (gravatar)

    Manuel said
    May 05, 2010

    Hello, I am very interested in RTL for DevExpress controls, I really find it shameful that they have no plan to develop this functionality.

    Even we were thinking of developing it ourselves, I can send information as you have done you?

    A greeting and thank you very much

  • Hola Manuel,

    Gracias por tu comentario. La forma en que yo lo hizo, fue cambiar el source-code de DevExpress controles y desarrollar RTL con GDI+ en el fondo del source-code.

    Por desgracia se necesita tiempo para hacerlo y cuando se publiquen una nueva version tendras que hacerlo de nuevo. Cuando se trata de "Grid Control" y generalmente los controles mas complejos, hacerlo se pone muy duro y complicado.

    Te sugiero utilizar WPF version del producto si es posible.

  • Amin (gravatar)

    Amin said
    June 29, 2010

    I Love U Abdullah

Your Information
Mrs. Gravatar (gravatar)

<-- It's a gravatar