Processing Forum
I can't right align text in TextField component of G4P library for processing.
Is alignment only working for labels ?
Here is my test example :
G4P_Showcase example modified for text field right aligned ( last line here down added in library original example )...
------------------------------------------------
public void createTextPlayArea(){
lblSomeString = new GLabel(this, "LABEL: Use combo boxes to change color scheme and font", 10, 10, 400, 20 );
lblSomeString.setBorder(1);
lblSomeString.setOpaque(true);
txfSomeText = new GTextField(this, "TEXTFIELD: Use combo boxes to change color scheme and font", 10, 50, 400, 20);
txfSomeText.setTextAlign( GAlign.RIGHT );
-------------------------------------------------
text field "TEXTFIELD: Use combo boxes to change color scheme and font" should be right aligned and it is not, while label field has no problem with that alignment.
I am using following environment :
G4P 1.7.0 and previous versions also
Windows XP
processing 1.2.1
thanks for informing me about the issue or solution. I haven't found anything about this problem on forums. Seems like either I have some strange config or nobody ever tried that alignment change in text fields, or we can't just do it with textfields though library reference informs that "setTextAlign" method can be used for GTextField component !! ... which seems strange to me as numbers are usually right aligned as a preference and it would just be so usefull.
Pierfranco