Re: GDI+ and RTL



The only thing to do is to draw differently for each case.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"Ananth" <Ananth@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B84ED041-B0ED-4C4A-99D4-D71BA1167633@xxxxxxxxxxxxxxxx
> Bob,
>
> I understand that RTL is for text orientation...whenever I create a
> form/window, I set the Window style to WS_EX_LAYOUTRTL and
> WS_EX_NOINHERITLAYOUT...when I put my custom menubar and toolbar inside
> this
> RTL window, i could see my menus and toolbar buttons arranged in right to
> left fashion..however, the problem comes when the user moves the mouse
> over
> the menuitems or toolbar buttons...in mouse move, i used the GDI+ methods
> such as DrawRectangle, FillRectangle, DrawLine, etc. to provide mouse over
> effects and that is where the inconsistencies(mentioned in my previous
> post)
> crop up ....are there any work arounds??
>
> Thanx,
> Ananth
>
> "Bob Powell [MVP]" wrote:
>
>> RTL settings are more intended for text than GDI+ graphics. There are
>> many
>> ommissions in the GDI+ library, although this is the first time I've seen
>> this issue mentioned i'm not surprised.
>>
>>
>> --
>> Bob Powell [MVP]
>> Visual C#, System.Drawing
>>
>> Ramuseco Limited .NET consulting
>> http://www.ramuseco.com
>>
>> Find great Windows Forms articles in Windows Forms Tips and Tricks
>> http://www.bobpowell.net/tipstricks.htm
>>
>> Answer those GDI+ questions with the GDI+ FAQ
>> http://www.bobpowell.net/faqmain.htm
>>
>> All new articles provide code in C# and VB.NET.
>> Subscribe to the RSS feeds provided and never miss a new article.
>>
>>
>>
>>
>>
>> "Ananth" <Ananth@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:F4236024-0069-476C-BE65-08B0216BA213@xxxxxxxxxxxxxxxx
>> > Dear Group,
>> >
>> > Are there any known issues in using the GDI+ classes/methods such as
>> > SolidBrush, Pen, DrawLine, DrawRectangle or FillRectangle - when the
>> > control
>> > is painted in a RTL layout? Because, we are encountering unexpected
>> > behaviours
>> > whenever we switch the layout of our application (to RTL). FYI, we are
>> > extensively using the GDI+ library for painting our custom controls. To
>> > give
>> > an
>> > example, I call the DrawRectangle and FillRectanlge by passing the same
>> > rectangle
>> > object (against the same graphics object), but the DrawRectangle draws
>> > the
>> > rectangle at the expected position (in RTL co-ordinates), whereas the
>> > FillRectangle fills it using the LTR co-ordinates.
>> >
>> > Any pointers to relevant help materials are very much appreciated.
>> >
>> > Thanx.
>>
>>
>>


.