Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Go Back  Xtreme Visual Basic Talk > > > Is there a way to keep my scroll bar from disappearing?


Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2011, 10:16 AM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default Is there a way to keep my scroll bar from disappearing?


When my full-screen sized Form is reduced in size by clicking on the "restore down" [i.e.] not to the minimized size but to in-between max and min, the scroll bar disappears. Is there a way to keep it automatically from disappearing [i.e.] to keep the scroll bar in view and available for use without having to make an adjustment to bring it back into view?
Reply With Quote
  #2  
Old 09-15-2011, 11:04 AM
DrPunk's Avatar
DrPunkIs there a way to keep my scroll bar from disappearing? DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

How are you managing the placement of the scroll bar on the size of the form changing?

Anchor?
__________________
There are no computers in heaven!
Reply With Quote
  #3  
Old 09-16-2011, 07:35 AM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default

Hi & thanks for the reply

In the form1 properties window in the layout section for scrolling - I see autoscrollmode, autoscroll, autoscrollmargin, autoscrollminsize, autosize, and autosizemode. I see nothing like anchor or anything that suggests placement management.
Reply With Quote
  #4  
Old 09-16-2011, 08:05 AM
DrPunk's Avatar
DrPunkIs there a way to keep my scroll bar from disappearing? DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

What I was asking is how you're handling adjusting the scrollbar when the form resizes.

Like, if I put a scroll bar on a form it just stays where it is at the size it is when the form resizes (which the form will be doing when you click restore or whatever).

In old VB you had to handle that stuff yourself (I think). So you'd handle the form resize event and adjust the controls parameters based on what the form is doing.

But .Net gives the controls an anchor property (i.e. it's a property of the control, not the form) which allows you to anchor controls to the form and it handles the moving and resizing of controls based on how you anchor it.

So maybe if you sorted the design of your form out so that your controls are anchored to the form then it would fix your problem.
__________________
There are no computers in heaven!
Reply With Quote
  #5  
Old 09-16-2011, 08:52 AM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default Controls and anchors

Re: "so that your controls are anchored to the form":

I have no clue regarding controls or anchors - so I need to learn about those concepts. My first approach will be Google and go from there. Any suggestions will be appreciated.

Thanks much for the help - you responders are invaluable.
Reply With Quote
  #6  
Old 09-16-2011, 09:03 AM
DrPunk's Avatar
DrPunkIs there a way to keep my scroll bar from disappearing? DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

There's not a great deal to learn. You can just stick a control on a form and play around with the different settings to see what effect they have. Or read -> http://msdn.microsoft.com/en-us/libr...ol.anchor.aspx

Like put a scrollbar on the bottom of a form and change its Anchor to Left, Right and Bottom and see what it does.

Also check out the Dock property of the control as well. That has a similar effect but you don't need to bother even positioning or sizing the control in the designer.

All depends on what you're trying to achieve as to the best to use.
__________________
There are no computers in heaven!
Reply With Quote
  #7  
Old 09-16-2011, 09:19 AM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default I think I actually understand

That turned on the light. I think I actually understand enough of what you say to probably do it without further hazzle.

Cheers
Reply With Quote
  #8  
Old 09-16-2011, 08:10 PM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default

Can I add a scroll bar to a form via select and drag from the toolbox [or somewhere else - I know not where] of must I do it by programming?
Reply With Quote
  #9  
Old 09-16-2011, 08:56 PM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default

Whoops!
Scratch #8 reply, just above. I found hScrollBar and vScrollBar in the toolbox. I had visually scanned the tool box too quickly looking for the leading letter S.
Reply With Quote
  #10  
Old 09-17-2011, 07:26 AM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default

I have been talking form all this time when I should have been talking rich text box. I am trying to add a vertical scroll bar to the left side of an rtb but so far have not been able to do so. I have tried unsuccessfully adding an rtb control from the tool box, googling for info and just playing around. Any suggestion will be appreciated. All I know about controls is that they control something.
Reply With Quote
  #11  
Old 09-19-2011, 04:53 AM
DrPunk's Avatar
DrPunkIs there a way to keep my scroll bar from disappearing? DrPunk is offline
Senior Contributor

* Expert *
 
Join Date: Apr 2003
Location: Never where I want to be
Posts: 1,403
Default

My initial response to that is why?

RichTextBoxes have their own scrollbars and they handle them themselves.

And controls don't really control anything. Controls are a means of getting feedback from a user through events. What the control does is down to the code written by the programmer in the event.
__________________
There are no computers in heaven!
Reply With Quote
  #12  
Old 09-19-2011, 09:42 AM
AtmaWeapon's Avatar
AtmaWeaponIs there a way to keep my scroll bar from disappearing? AtmaWeapon is offline
Fabulous Florist

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 9,500
Default

There's only one good reason to do this: if your language is a right-to-left reading language. I'll get to that in a minute.

Many languages read left-to-right. English is one of them, so the default Windows experience tends to use these conventions. In a left-to-right version of Windows, scrollbars *always* appear on the right-hand side of a window. The main reason is it fits a book metaphor: the scrollbar is where you would reach to turn to the next page in a book. You may think being unique is cool or a good thing, but putting your scrollbar in a place it hasn't been for 30 years means your users are going to be initially confused. It also means every time they use your application there will be a moment of confusion as they remember yours is the "weird" one. It will make you stand out about like being the kid in class with horrible acne: everyone will remember you but you'll wish they didn't.

Other languages read right-to-left. In those languages, many elements of the Windows experience move to the other side of the screen; I think scrollbars are one of them. If you're trying to make a RichTextBox that works better for one of these languages, there's two things you should try:
  • Use a version of Windows intended for the language you are targetting.
  • Set your form's RightToLeft property to True. This is an ambient property and changing it on the form will update all controls.
Of course, toggling RightToLeft isn't what you should do if you're in a left-to-right language. It tends to make typing in the control difficult, as you're lying about the language.

If you really want a scrollbar on the wrong side of the control, it's quite difficult in Windows Forms and no matter which way you approach it you'll spend a lot of time on it. In WPF you can retemplate the control to do this pretty easily, but it's still not what I'd recommend.
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
  #13  
Old 09-19-2011, 01:16 PM
jcmjcm jcmjcm is offline
Freshman
 
Join Date: Sep 2010
Posts: 40
Default Answer to "why"?

Hi Doctor Punk & Mr. Guru,

Good question, “why”?

The following is the sequence of events that have occured:
I had positioned a rich text box on a form. The rtb size was much smaller than the form size so that when I restored the form down [ie] reduced the size of the form so that I could display [on the screen] the rtb next to [eg] a graph created by another program, the scroll bar disappeared. So I thought it would be a good idea to place a scroll bar on the left side of the rtb.

Per this thread, not such a great idea. However, I have eventually reduced the form size to just accommodate the rtb. That solved the problem.

I learned a lot. Thanks again for your help.

PS - Instant email notification still doesn't work for me. My email address is jcmjcm@verizon.net. I will paw around, like maybe in my forum profile, to check on correct address.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing? Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
 
Is there a way to keep my scroll bar from disappearing?
Is there a way to keep my scroll bar from disappearing?
 
-->