-
Jan 21st, 2018, 05:19 PM
#1
Thread Starter
New Member
[RESOLVED] Textbox scroll bars won't show
I have a textbox on a form that I am writing text to from within a program. If the textbox starts empty, then I just send the textbox the text I want. If the textbox has anything in it, I add a space then more text.
What I want is HORIZONTAL scroll bars to show up when the textbox is full (horizontally). I have the properties of the textbox set as follows:
TextBox3.AcceptsReturn = True
TextBox3.AcceptsTab = True
TextBox3.MultiLine = True
TextBox3.ScrollBars = Horizontal
TextBox3.WordWrap = True
Here is my code:
Code:
If TextBox3.Text = "" Then
TextBox3.Text = Trim(TextBox2.Text)
ElseIf TextBox3.Text <> "" Then
TextBox3.Text = TextBox3.Text & " " & Trim(TextBox2.Text)
End If
I cannot get them to appear
HELP!
-
Jan 21st, 2018, 05:23 PM
#2
Re: Textbox scroll bars won't show
Pretty sure you have to set:
Code:
TextBox3.WordWrap = False
The whole point of the WordWrap property is so that text doesn't go off screen (requiring horizontal scrolling) when True. Since you actually want Text to go off screen and have a scroll bar, it can't be set to True.
-
Jan 21st, 2018, 05:30 PM
#3
Re: Textbox scroll bars won't show
The documentation for the WordWrap property even tells you exactly what OptionBase1 posted:
If this property is set to true, horizontal scroll bars are not displayed regardless of the ScrollBars property setting.
That's why you should always read the relevant documentation first. If you need help, it's not a bad idea to use the Help menu.
-
Jan 21st, 2018, 05:34 PM
#4
Thread Starter
New Member
Re: Textbox scroll bars won't show
I tried this and it does not work
-
Jan 21st, 2018, 05:38 PM
#5
Thread Starter
New Member
Re: Textbox scroll bars won't show
I do NOT get HELP from vb 2010!
-
Jan 21st, 2018, 06:12 PM
#6
Re: Textbox scroll bars won't show
Originally Posted by Jazz_Lover2
I do NOT get HELP from vb 2010!
All I did to get that quote was select 'Help > View Help' from the VS main menu, select the index, type "textbox" into the filter field, click on the 'TextBox class' item, select the WinForms TextBox item and then click on the WordWrap property entry. All up it took less than 30 seconds. You could even just click on WordWrap in code and press F1 to get there even quicker. If you don't get help from VB 2010 then it's because you don't try or don't try properly to get it. I've been using the VS documentation as my first option for help since 2003, when I was a VB.NET beginner myself, so I know that of which I speak. If I can do it, then anyone can do it, which means that you can do it.
-
Jan 21st, 2018, 08:09 PM
#7
Thread Starter
New Member
Re: Textbox scroll bars won't show
I am sorry that I bothered this forum.
-
Jan 21st, 2018, 08:43 PM
#8
Re: Textbox scroll bars won't show
Originally Posted by Jazz_Lover2
I am sorry that I bothered this forum.
You posted 5 property values and a snippet of code, code that is completely irrelevant to the issue you reported. You received two replies within about 10 minutes pointing out the (I would say obvious) issue with the property values you posted. You then responded with a one sentence response saying you tried that and it didn't work. It's not even clear based on your response if you are trying to say you tried that before you made your post here and it didn't work, or you tried it based on the responses you received here and it didn't work. No screenshots of what you are seeing happen, no additional code provided, no further details.
Not sure what else you expect.
-
Jan 21st, 2018, 08:46 PM
#9
Re: Textbox scroll bars won't show
Originally Posted by Jazz_Lover2
I am sorry that I bothered this forum.
I see that a lot. I demonstrate to people that they can help themselves and rather than take the advice and help themselves they choose to think that they couldn't have possibly done anything wrong so I must be wrong and they go all passive aggressive. You're allowed to ask questions and I'm not saying or even implying that you aren't. What I'm saying is that you can use the Help system provided with your IDE to help yourself and, if you do that, you'll be able to answer many of your own questions quicker without having to post online. Do you not want to be able to solve your own problems? That is your right but if that's the case then at least own it. If you do then why not do the things that will make that happen?
-
Jan 21st, 2018, 09:07 PM
#10
Thread Starter
New Member
Re: [RESOLVED] Textbox scroll bars won't show
I tried ALL of your suggestions, followed all of the advice of:
https://msdn.microsoft.com/en-us/lib...v=vs.110).aspx
AND IT STILL DONT WORK.
I AM DONE WITH THIS GOD DAMN ****!
-
Jan 21st, 2018, 09:21 PM
#11
Re: [RESOLVED] Textbox scroll bars won't show
Forum tilt is more entertaining when you use huge fonts by the way.
We're obviously not getting the whole picture, and you might not be able to provide the whole picture, but I could go for a screenshot at this point of what you are actually seeing at this point. Hell, post the entire form code, I'll dig through it and try to find the issue.
What you are trying to do is not the least bit difficult, so there's probably some minor thing that you are overlooking.
-
Jan 21st, 2018, 09:22 PM
#12
Re: [RESOLVED] Textbox scroll bars won't show
The two TextBoxes shown in the image below are exactly the same (one was a copy and paste of the other) except that WordWrap is set to True for the first one and False for the second one. All I did was add a TextBox, set its properties (Multiline = True, Scrollbars = Horizontal, WordWrap = True, Size = whatever), copied and pasted the TextBox and set the WordWrap property to False for the new one. I then ran the project, type some text into the first TextBox and then copied it into the second one. Clearly, the scrollbar is displayed when WordWrap is False and not when it's True. Assuming that nothing is actually corrupt on your system, either you're doing something wrong or your expectations and description of them don't match. We only know what you tell us so, if you'd like more help, you're going to need to tell us everything that's relevant.
-
Jan 21st, 2018, 09:52 PM
#13
Thread Starter
New Member
Re: [RESOLVED] Textbox scroll bars won't show
Look, you tried and failed to help. You didn't trust that i tried to help myself before i came here.
I am sick and tired of asking for help to be put down and belittled.
Administrator, please delete my account. I will not return or post any further.
This mother ****in, god damned site sucks ass!
-
Jan 21st, 2018, 10:03 PM
#14
Re: [RESOLVED] Textbox scroll bars won't show
You are quite welcome, glad we could help.
-
Jan 21st, 2018, 10:08 PM
#15
Re: [RESOLVED] Textbox scroll bars won't show
Originally Posted by Jazz_Lover2
Look, you tried and failed to help.
We provided the only apparent solution to your problem. If that didn't solve the problem then either something is broken on your system, which we couldn't possibly diagnose, or you did something wrong. It's not a problem if you did something wrong but we can't work out what it is if you spit the dummy instead of providing us with the information relevant to the issue. I provided step by step instructions on how to demonstrate that the advice provided does work. Did you try those steps? Did you see the same behaviour that I did? If so then there is apparently something wrong, whether it be code or corruption, in your original project.
Originally Posted by Jazz_Lover2
You didn't trust that i tried to help myself before i came here.
Nope. That's not even close to true. I don't know what you did or didn't do before you came here. What I do know is that you either didn't read the relevant documentation or ignore what it said. If that wasn't the case then you wouldn't have had WordWrap set to True and expected a scrollbar to show. Whatever else you do or don't do, you should always read the relevant documentation. Doing so will help so why is it such a bad thing that I point it out?
Originally Posted by Jazz_Lover2
I am sick and tired of asking for help to be put down and belittled.
Really? You were, at worst, criticised and it happened in one thread and you're sick and tired of being belittled? Seems to be more than a slight exaggeration. I suspect that there's something else going on here. Even if I had belittled you in this thread, which I haven't, your comment makes it sound like it's happened regularly in multiple threads, which it hasn't.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|