SoloCodigo

Programación General => C/C++ => C++ Builder => Mensaje iniciado por: neg1414 en Martes 14 de Agosto de 2007, 18:13

Título: Alinear El Texto De Un Tedit A La Derecha
Publicado por: neg1414 en Martes 14 de Agosto de 2007, 18:13
Buenas:

   Como se puede alinear el Texto de un Edit a la derecha en tiempo de Ejecucion

   Gracias
Título: Re: Alinear El Texto De Un Tedit A La Derecha
Publicado por: Ithilien en Miércoles 15 de Agosto de 2007, 10:53
Hola, por lo que he visto de la ayuda, existe una propiedad Alignment que indica la alineación del texto del Edit. Concretamente:

Código: Text
  1.  
  2. Determines how the text in the edit component is aligned.
  3.  
  4. __property TAlignment Alignment = {read=GetAlignement, write
  5. =SetAlignment, default=taLeftJustify};
  6.  
  7. Description
  8.  
  9. Use Alignment to indicate text alignment in the edit box. These are the possible values:
  10.  
  11. Value  Meaning
  12.  
  13. taLeftJustify  Align text on the left side in the edit control.
  14. taCenter                  Center the text in the edit control.
  15. taRightJustify  Align text on the right side in the edit control.
  16.  
  17.  

Dice que es heredada de TCustomEdit. Al probar con un Edit normal, no me aparece, así podrías crearte un TCustomEdit con las mismas medidas / propiedades que tu edit, y establecerle la propiedad Alignment a taRigthJustify.

Espero que te sirva.

Saludos!