carl 83 posts since
Oct 17, 2007
1.
Re: How to hide the scrollbar of TextArea? Jun 30, 2008 9:31 PM
It's not officially supported, but the following example should work with either StandardTextAreaUI or SkinnableTextAreaUI:
{value
def ta = {TextArea}
{type-switch ta.ui-object
case base:BaseMultiLineTextControlUI do
{if-non-null sb = base.scrollbox then
set sb.always-disable-vscroll? = true
set sb.shrink-vscroll? = true
}
}
ta
}
If the ui-object on the Control changes, you'll have to repeat the operation. Alternately, if you're defining and using your own subclass of {BaseMultiLineTextControlUI-of ...} as the ui-object, you could clean this up a bit and override its create-contents method to set these two options on the ScrollBox (BaseTextAreaScrollBox) returned by super.
(As one of these vscroll options is directly set by the UI, you wouldn't be able to use a StyleSheet to change this.)