I'm developing an Application that is targeted for the Arabic language.
When using a standard GridView to get the grid to display in a right to left fashion you need to mirror the control. The code to do this looks like this:
protected override CreateParams CreateParams { get { CreateParams CP; CP = base.CreateParams; if(_mirrored) CP.ExStyle = CP.ExStyle | WS_EX_LAYOUTRTL | WS_EX_NOINHERITLAYOUT; return CP; } }
This works perfectly with the GridView, However with the WinGrid the text is painted in reverse as if it was flipped.
Is there a way to override this behavior and get it to paint correctly?
Hi
Thank you for your reply, Boris
At this stage we are only requested to implement Right To Left for Text.
The Right To Left Layout will possibly be relevant in future but not now.
Jukka
The list I provided actually missed something - I update the list:
Hello Jukka,
I would like to know if you want the layout itself to be right-to-left of the controls or the text in these controls.
Hello,
My company has a need for Read-To-Left due to need to create an Arabic version on our User Interface. We are using this subset of Infragistics on the product I am refering to:
How should I now proceed with the request ?
You can use the following Code
// Reverse the column display order when mirrored
)oCtl;
oGrid.RightToLeft =
.No;
//oGrid.DisplayLayout.ScrollBounds = ScrollBounds.ScrollToFill;
//oGrid.DisplayLayout.ColScrollRegions.
//oGrid.RightToLeft = rtl;
iB = 0;iB < oGrid.DisplayLayout.Bands.Count; iB++)
{
colCount = oGrid.DisplayLayout.Bands[iB].Columns.Count;
(colCount > 0)
// Check it was mirrored before
iC = 0; iC < colCount; iC++)
(mirror)
oGrid.DisplayLayout.Bands[iB].Columns[iC].Header.
VisiblePosition = colCount - iC - 1;
}
else
VisiblePosition = iC;
oGrid.ActiveColScrollRegion.ScrollColIntoView(oGrid.DisplayLayout.Bands[iB].Columns[1]);
// Set the cursor to the most right column
Working on the same solution i guess the problem here is infragistic.wingrid is derived from a base class, if we know from which base class it is derived we have to use createparam on that class also, this way we can acheive the result.
However, i am not sure exactly from which base class infragistic.wingrid is derived.