[fxruby-users] FXTextField and text alignment
Jeroen van der Zijp
jeroen at fox-toolkit.org
Wed Jul 2 10:41:28 EDT 2008
On Wednesday 02 July 2008, Philippe Lang wrote:
> When the text inside an FXTextField is larger that the available space,
> the FXTextField apparently "switches" from left alignment to right
> aligment: you only see the end of the text. When the text is smaller
> than the available space, text is aligned on the left.
> Is there a way to change that, and have left alignment all the time?
> I've been trying a few things, like LAYOUT_SIDE_LEFT or LAYOUT_LEFT, but
> without success.
It does not switch; however, when putting text in the field, the cursor is
placed at the end inside the field, which may cause a scroll to make this
So, simply call textfield->moveCursor(0) to jump the cursor back; or call
textfield->makePositionVisible(0) to scroll but leave the cursor position
at the original place...
Hope this helps,
More information about the fxruby-users