I have a listbox, an HTMLviewer, and a textarea. ScrollbarVertical is set to ON for all three, in the IDE.
With the Listbox and the HTMLviewer, no scrollbar appears until needed (i.e. more content than will fit), and then I can scroll those areas with the mouse as expected.
With the textarea, there is an empty scrollbar even when the text area is empty (i.e., no thumb). But, as I add content to it, with:
MainWindow.LoggingTabs1.LogArea.AppendText (locbuf + EndOfLine ())
the scrollbar doesn’t get a thumb when the content no longer fits and I can’t scroll it. The excess content just disappears off the bottom and is hidden.
How do I make the textarea’s scroll bar behave as for the listbox and HTMLviewer?
OS X 10.9.5, Xojo 2015 R3 installed today.
The knob appears only when you scroll. That is the standard behavior under Mac OS X, which you can verify in programs such as TextEdit. If you want the same as the Listbox anyway (kind of out of fashion), you can use the ScrollBar control and get and set the ScrollPosition of the TextArea in its ValueChanged event.
It should be possible to do the same in HTMLViewer, but that will require extra coding in JavaScript.
Yes, except that it’s not appearing. That is my problem.
If I have to use a ScrollBar control, what is the point of being able to specify ScrollbarVertical for a text? Or is it not intended for the use I am making of it?
You can change the default OS X scrollbar behavior in the System Preferences, General tab. There are 3 options for “Show scroll bars”:
- Automatically based on mouse or trackpad (this is the default)
- When scrolling
- Always
You probably want “Always” for the behavior you are looking for.
It is already set for “Always”. But I think we’re talking at cross-purposes here. My trouble is that although the text area has a scrollbar, it doesn’t work. I would expect that, with too much content in the textarea, I’d be able to scroll it. But even as I continue to append text, the scrollbar never acquires a thumb and so I can’t scroll the textarea.
There is nothing special you should have to do. If the TextArea has more text than will fit and VerticalScrollbar is True, then you can scroll through the text using the scrollbar. That’s how it is working for me.
Do you have a sample project you can share?
I’ll have to try a small example and see how that goes. If a small example works as it ought to, then I can try to see how that differs from my project.
I did restore R2.4 from Time Machine and that behaves the same way.
Apparently Perl is already installed on Mac.
Perl -v
in Terminal shows this under EC :
[code]This is perl 5, version 18, subversion 2 (v5.18.2) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2013, Larry Wall
[/code]
I have never tried to run a cgi app locally, but it is probably just as simple as placing it in the web space and point to it.
Right, so it was my fault. Nothing wrong with textarea scrolling at all. I’d put those controls inside a container and I didn’t have the padlocks set right. So half of the textarea was not visible; had I gone on adding text to it, I’d have seen scrolling taking place eventually. I’m using imSplitter to give me resizing bars.