- priority: 5 --> 2
When a JSCTextView is first created, select from the language does not hilight in the view. But clicking on the
window once makes everything work...
Try
(
var win;
win = JSCWindow.new;
t = JSCTextView( win, win.view.bounds.insetBy( 4, 4 ))
.resize_( 5 )
.hasVerticalScroller_( true )
.autohidesScrollers_( true )
.string_("adsf;ajhdslfhwae uhaiush dsuaefw")
.focus( true );
win.front;
)
t.select(0, 20);
t.selectedString;
seems a swing bug. appears with different LnF. generally, selection only visible after text view has active focus:
(
var win;
win = JSCWindow.new;
w = win;
t = JSCTextView( win, win.view.bounds.insetAll( 4, 4, 4, 40 ))
.resize_( 5 )
.hasVerticalScroller_( true )
.autohidesScrollers_( true )
//.usesTabToFocusNextView_( false )
.string_("adsf;ajhdslfhwae uhaiush dsuaefw")
// .focus( true );
.select( 0, 20 );
JSCButton( win, Rect( 4, t.bounds.bottom + 4, t.bounds.width, 32 ))
.states_([[ "Test" ]])
.focus( true );
win.front;
)