Re: AWT ScrollPane

From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 05/29/04


Date: Sat, 29 May 2004 19:16:11 GMT

On Sat, 29 May 2004 12:18:15 +0200, "ak" <spam@imagero.com> wrote or
quoted :

>if you use TextArea, then just create TextArea with only 1 ScrollBar:
>int rows = 100;
>int columns = 400;
>
>TextArea ta = new TextArea("some text", rows, columns ,
>TextArea.SCROLLBARS_VERTICAL_ONLY);

The problem is I need to scroll a custom component I draw myself as a
bit map.

What I do is swap it with a vanilla TextArea if someone wants to cut
and paste, where the scroll bars are under control in AWT. However
that still does not get rid of the unwanted control bars on my custom
component that is stuck using ScrollPane.

I suppose since TextArea can do it, supposedly I could to, building
scrollbars into my custom component the same way TextArea did.

-- 
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Relevant Pages

  • Re: scrolling in textarea to selection in FF
    ... textarea automatically scroll to the selection in Firefox. ... start position of the selection, so that I can actually scroll to it. ...
    (comp.lang.javascript)
  • TextArea Horizontal Scrolling
    ... java application with a textarea. ... I would like the horizontal scroll ... space style property both nowrap, and pre, with still no luck. ... work okay. ...
    (comp.lang.javascript)
  • Re: Problem with Textarea - Mozilla
    ... in your test case it looks as if that function correctly places the caret in the textarea but the textarea is not scrolled to the line where the caret is set. ... It is not easy to correct from the JavaScript code itself as obviously what you want to happen is that setSelectionRange, a native function implemented in Mozilla, itself scrolls to the line where the caret is. ... so if you want to fix that with JavaScript you would need to scroll to the intended line by setting textarea.scrollTop as needed. ...
    (comp.lang.javascript)
  • Using js to scroll to caret pos in textarea in Firefox
    ... I'm trying to scroll a textarea to the position of the caret which is ... below the visible area of the textarea in firefox. ...
    (comp.lang.javascript)
  • doScroll method not compatible with Netscape
    ... textarea on my Web page. ... I have made a test with the doScroll method which is part of the Microsoft ... function scrollBehaviorUp() ... I had succeeded in eliminating the gray standard scroll bar in IE ...
    (microsoft.public.scripting.jscript)