TextArea stuck in ContainerControl

I created a ContainerControl which contains also a textarea. This textarea shows gathered info and should not be edited, so ReadOnly is on, I do not want to show the TextArea border, so this one is switched off.

The text in the TextArea is larger than the size of the Area and ther vertical scrollbar, which is on, need to be used.

When I load the container all shows ok. However, when I try to scroll the text and try to move the text with the scrollbar, the scrollbar does not respond and, whille not touching the text, it starts to select the text.

TextArea is enabled, Container control is enabled. I have not clue why it behaves like this.

Anybody got an idea?

Example project should be easy to do and would be tremendously helpful. Otherwise it’s a guessing game.

Btw Read-Only does not prevent selecting and copying the text.

[quote=243450:@Markus Winter]Example project should be easy to do and would be tremendously helpful. Otherwise it’s a guessing game.

Btw Read-Only does not prevent selecting and copying the text.[/quote]

No, read-only prevents deleting or adding text. That was the purpose.

  1. Make a Containercontrol (TestContainer) with an textarea (no further properties set in the Inspector of the ContainerControl)

Textarea: Border = Off, ScrollbarHor = off, ReadOnly = On, AcceptTabs = off, all other options are on, width = 265, Height = 77

Dim testFr as new TestContainer

testFr = new TestContainer
testFr.EmbedWithin(self,10,10,592,100)

Run the program, you cannot touch the scrollbar, no matter where you position the textarea in the ContainerControl, when you press the mousebutton you only select text in the textarea, while your mouse is moving over the scrollbar. The scrollbar is not responding.

Is there something I overlooked?

Funnily enough you must have multiline enabled for the scrollbar to work.

No MultiLine, no ScrollBar.

ScrollBar Horizontal should be ON, the vertical one off.

Btw the line testFr = new TestContainer is unnecessary.

[quote=243470:@Markus Winter]Funnily enough you must have multiline enabled for the scrollbar to work.

No MultiLine, no ScrollBar.

ScrollBar Horizontal should be ON, the vertical one off.

Btw the line testFr = new TestContainer is unnecessary.[/quote]

That is what I said, I mentioned a few I did set and all other properties are on, thus mulitiline is on too:
Textarea: Border = Off, ScrollbarHor = off, ReadOnly = On, AcceptTabs = off, all other options are on, width = 265, Height = 77

So, I have mulitline on, scrolbarVer = on and still I cannot move the scrollbar :-o

Any idea?

Works fine here.

Try a restart.

I suspect the OP is using Windows. Reference to the scrollbar that are not visible in Mac.

However, I could not reproduce the issue either in Windows 10 with 2015R4. Must be a bug in his project.

Well, I use windows 7 and Xojo 2015v3.1, because Xojo 2015v4 has a bug that keeps Xojo restarting when listboxes are used. It is solved and the fix comes with Xojo 2016v1.

Anybody else got an idea?

I checked again with 2015R3.1, it just works fine too.

Would you have any return true in MouseDown anywhere ?

[quote=243572:@Michel Bujardet]I checked again with 2015R3.1, it just works fine too.

Would you have any return true in MouseDown anywhere ?[/quote]
Hmm, I did not use any mouse event in this part. Not in the Container control. nor in the TextArea, that is why I am searching for a long time what causes this. If it works with you I have to re-read my code again, however, there is not much code to review or properties which are changed to check. All was written above.

Won’t you create a new project with just the container control and TextArea, and see what happens ?

If you have implemented MouseDown on the window on which the container was placed, that might cause this too.

No, I did not use and event handler in teh ContainerControl. Last weekend I solved my problem, temporarily till I find another solution, with a workaround. Not using the ContainerControl for now.

I have encountered this bizarre behaviour of the scrollbar not working in text boxes too. I can’t pin it down to anything yet. Dragging in the scrollbar selects text in the text box, but it is as if the scrollbar is just not there. I shall do more exploring. Just wanted to say Rob, you are not alone.

Ahh, thanks, that is good to know. I was till now still not able to pinpoint the cause.

Although not on Windows, I often use read-only TextAreas in Containers.
Does this work?
https://dl.dropboxusercontent.com/u/609785/Xojo/Forum/txtcnt.xojo_binary_project