Link to home
Start Free TrialLog in
Avatar of JasonC
JasonC

asked on

TRichEdit control, doesn't allow me to change Alignment

When I try to change the alignment of a TRichEdit control at run time it doesn't work.

What's wrong with my code?
MyEditControl.Alignment := taCenter;


Avatar of rwilson032697
rwilson032697

The alignment property of a TRichEdit refers to the left, center or right alignment of text within it.

Use the Align property instead. Unfortunately the Align property doesn't let you center so you will need to adjust the top and left properties to center the component.

Cheers,

Raymond.
Avatar of JasonC

ASKER

I'm sorry you got the wrong impression, but I am trying to change the alignment of the text within the control.

This shuld work, I know, but it will only work if I change the properties in the design environment.
ASKER CERTIFIED SOLUTION
Avatar of BlackMan
BlackMan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JasonC

ASKER

These answers are good, but the problem I had was that the Alignment property does not seem to work unless the Align property has been set to something other than alNone.

Thanks for you responses.