|
-
Mar 4th, 2002, 09:54 AM
#1
Thread Starter
Hyperactive Member
DockStyles
Hi All,
I have a richtextbox and a status bar, and they are causing me some problems, the format is the following...
--------
| RTB |
| |
---------
---------
| SB |
---------
I want the RTB to fill, which it does, but I do want to fill only to the status bar, because if it goes more than that, I can not access the horizontal scroll bar. Something like this would be IE. With the status bar below the display area fills up the
available space upto the status bar. Anyone know of anything??
Here is my code setting the properties of the two:
Code:
statusBar1.Location = new System.Drawing.Point(0, 379);
statusBar1.BackColor = SystemColors.Control;
statusBar1.Size = new System.Drawing.Size(512, 20);
statusBar1.TabIndex = 1;
statusBar1.ShowPanels = true;
statusBar1.Text = "statusBar1";
statusBar1.Dock = DockStyle.Bottom;
statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {statusPanel, linePanel});
textArea.Text = "";
textArea.Size = new System.Drawing.Size(512, 359);
textArea.TabIndex = 0;
textArea.Dock = System.Windows.Forms.DockStyle.Fill;
textArea.WordWrap = false;
textArea.AcceptsTab = true;
textArea.ScrollBars = RichTextBoxScrollBars.Both;
textArea.TextChanged += new System.EventHandler(this.TextArea_TextChanged);
Thanks
Bill
-
Mar 4th, 2002, 10:09 AM
#2
Have you tried the Anchor property? try setting it to hold postion for bottom...or something like that..havent used it yet.
-
Mar 4th, 2002, 10:22 AM
#3
Thread Starter
Hyperactive Member
Yes, I have tried setting achor to bottom. Arrg, it has to be something simple I am just overlooking.
-
Mar 4th, 2002, 10:32 AM
#4
Hyperactive Member
Try selecting the RTB and "bringing to front" - (or sending to back)
-
Mar 4th, 2002, 11:07 AM
#5
Thread Starter
Hyperactive Member
Yes but if i do this would i just then be covering the status bar instead of the text area?
-
Mar 4th, 2002, 11:10 AM
#6
Hyperactive Member
no I don't think so, fill should just fill the remaining space.
so you could have a toolbar an RTB and a statusbar on the form.
as long as the status bar and toolbar are behind the rtb, the rtb should only fill the space in the middle.
Ive just set up a quick test form and it seems to work like that.
try it and see...
-
Mar 4th, 2002, 01:37 PM
#7
Thread Starter
Hyperactive Member
Thanks Bananafish, that works great!!
If i ever catch a bananafish, I will let it go from now on!
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
|