Getting scroll bars in RichTextBox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NehaDas
    New Member
    • Jan 2009
    • 8

    Getting scroll bars in RichTextBox

    Hello Everyone !
    Iam relatively new to .NET C# and m still in the process of exploring various options. Any help with regard to this query will be highly appreciated ...
    Iam working on an application that somewhat is similar to outlook .
    It will have a list of messages received on top and a reading pane below displaying the message selected by user.
    The problem is as follows :
    The screen is structured in the form of 3 taskcards :
    1)New Message List
    2)Search Msg List
    3)The reading pane
    when user selects a msg in the first task card , the second taskcard should close by itself and the reading pane automatically becomes bigger . The prob is when all 3 taskcards are initially in open mode , the reading pane being the last should end somewhere where the screen display ends , with the message body displayed in richtextbox with scroll bars in case of long msgs . The textbox in my case , is not displaying the vertical scroll bar even with long msg . I figure dats becoz it will display the scroll bar only if the text content is more dan the size of the textbox . How do i get the scroll bar ?? U have to remb i have set the textbox to a bigger size so that when the reading pane is toggled , the text box fills up till the bottom of the screen . If a set a fixed size , the text box will retain the same size parameters even when the taskcard becomes bigger .
  • vekipeki
    Recognized Expert New Member
    • Nov 2007
    • 229

    #2
    Scroll bars will appear if text content is larger than the rich text box (if ScrollBars property is set to Both).

    But if I understood correctly, you are saying that you RTbox is larger than your form, but positioned so that the bottom part is hidden? If that is correct, you should fix that.

    You could use SplitContainer to create two horizontal regions with a splitter, and then Dock your controls to Fill both
    panels of the SplitContainer.

    Comment

    Working...