----- Original Message -----
From: Weston Bell <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2000 8:34 AM
Subject: [DUG]: TMemos & StringGrids


> Hi,
>         Can anyone help me with placing a schedule of items and amounts
> in a memo in which the Item Description is Left Justified and the
> Related currency amount is Right Justified or are there other ways of
> aligning the data?
>         An alternative is to use a StringGrid but unlike a DBGrid you
> cannot Rightjustify a column in the StringGrid.
>
The simplest way to achieve this is to owner-draw the currency amount in the
string-grid cell using the OnDraw cell event, or use a list box and
owner-draw both description and amount.

Look at the WinAPI function DrawText which has flags like DT_RIGHT to do the
right justification for you.

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to