Right To Left

[b][red]This message was edited by heyyyt at 2005-10-7 4:36:50[/red][/b][hr]

Hello Friends,

I am using C# .NET .
I want to write a program which gives output in this format;

USER1 1.200,00
USER2 __100,99
USER3 ____1,12

Note: Underscores aren't needed. I only want to show the format and allignment...

You can say that is easy if you give me the formatted text. OK. I have this. I have a function which gives you formatted text.


public void IntToMoneyFormat(int money) {.....}

But I should give the output with System.Drawing.Graphics.

The mean problem is I do not know how I can define horizontal allignment to right.

Please help me.







Comments

  • : [b][red]This message was edited by heyyyt at 2005-10-7 4:36:50[/red][/b][hr]
    :
    : Hello Friends,
    :
    : I am using C# .NET .
    : I want to write a program which gives output in this format;
    :
    : USER1 1.200,00
    : USER2 __100,99
    : USER3 ____1,12
    :
    : Note: Underscores aren't needed. I only want to show the format and allignment...
    :
    : You can say that is easy if you give me the formatted text. OK. I have this. I have a function which gives you formatted text.
    :
    :
    : public void IntToMoneyFormat(int money) {.....}
    :
    : But I should give the output with System.Drawing.Graphics.
    :
    : The mean problem is I do not know how I can define horizontal allignment to right.
    :
    : Please help me.
    :
    :
    :
    :
    :
    :
    :
    :

    The only advice i can give you is use an String.Format()
    Take a look at http://idunno.org/displayBlog.aspx/2004071401 for implementing several formats.

    Mark van den Broek
    MCAD

  • : : [b][red]This message was edited by heyyyt at 2005-10-7 4:36:50[/red][/b][hr]
    : :
    : : Hello Friends,
    : :
    : : I am using C# .NET .
    : : I want to write a program which gives output in this format;
    : :
    : : USER1 1.200,00
    : : USER2 __100,99
    : : USER3 ____1,12
    : :
    : : Note: Underscores aren't needed. I only want to show the format and allignment...
    : :
    : : You can say that is easy if you give me the formatted text. OK. I have this. I have a function which gives you formatted text.
    : :
    : :
    : : public void IntToMoneyFormat(int money) {.....}
    : :
    : : But I should give the output with System.Drawing.Graphics.
    : :
    : : The mean problem is I do not know how I can define horizontal allignment to right.
    : :
    : : Please help me.
    : :
    : :
    : :
    : :
    : :
    : :
    : :
    : :
    :
    : The only advice i can give you is use an String.Format()
    : Take a look at http://idunno.org/displayBlog.aspx/2004071401 for implementing several formats.
    :
    : Mark van den Broek
    : MCAD
    :
    :

    Thank you Mark. I have already found the solution so your "Solution Proposal" works.

    StringFormat format = new StringFormat();
    format.Alignment = StringAlignment.Far;

    This code defines the alignment of the string to right. Note: This works only System.Grapics.

    Re-Thanks.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories