[fxruby-users] TEXT_AUTOSCROLL in FXText with usage of FXDataTarget
Jeroen van der Zijp
jeroen at fox-toolkit.org
Thu Sep 11 09:44:58 EDT 2008
On Thursday 11 September 2008, Thilko Richter wrote:
> I have a FXTextfield connected with a FXDataTarget. My FxTextField is
> a logging window, so I always would like to see the last line
> visible. I initialized the FXText with FXText::TEXT_AUTOSCROLL, but, I
> dont know why, the last line is no keep visible, although I can see
> the updates of the TextField through the FXDataTarget. Currently I
> switch to a manually assignment of the text and call
> "makePositionVisible", but is this the right solution?
> As far as I understand the TEXT_AUTOSCROLL should always scroll to the end?
Actually, TEXT_AUTOSCROLL isn't implemented ;-)
Its not common to connect FXText via FXDataTarget, on account of the amount of
data that may be transferred, and the huge cost of updating text metrics non-
My suggestion is to append text piecemeal fashion:
This will incrementally update and scroll to the last character position.
If you're adding a LOT of text, you may want to:
Which will trim from the top of the widget, to keep the number of
lines less than maximum_number_of_rows.
Hope this helps,
More information about the fxruby-users