By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,723 Members | 975 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,723 IT Pros & Developers. It's quick & easy.

Setting control to dock fill when you have a menustrip

P: n/a
Hi,

I have not had a good answer to this question.

I put a menustrip on a form and so it is a main menu in affect.

Now I put a webbrowser control on the form and set it dock fill.

Of course what happens is the menu covers the top of the webbrowser control
which i do not want.

Is there a property to have the control automatically drop
so it is aligned with the bottom of the menu??

Or do i have to set the top property and anchor the control etc
to achieve this, seems wrong to have to.

rotsey
Sep 12 '07 #1
Share this Question
Share on Google+
12 Replies


P: n/a
Rotsey wrote:
I have not had a good answer to this question.

I put a menustrip on a form and so it is a main menu in affect.

Now I put a webbrowser control on the form and set it dock fill.

Of course what happens is the menu covers the top of the webbrowser control
which i do not want.
For what it's worth, the reason I didn't answer your previous post was
that the problem seemed odd to me. That is, I haven't had any trouble
having dock-filled controls overlapping the menu strip. But I didn't
have time to verify it at the time.

Since then I have had time, and I can confirm that I don't have any
trouble doing what you want to do. I drop a menu on the form, then a
control, set the control's Dock property to Fill, and it winds up flush
against the menu strip, not overlapped.

I'm using VS 2005 and .NET 2.0.

Perhaps you could post a concise-but-complete example of code that
demonstrates a form that contains a docked menu strip and a docked
control, where the control winds up overlapped with the menu strip. It
should just work, but if it doesn't for you then if you can post code
that demonstrates the problem then someone can look at it and try to
understand what's different about the code you wind up with as compared
to what the rest of us have.

It may be sufficient to just post the InitializeComponent() method for
your form, actually...so if you don't want to post the rest of the class
right off the bat, just post that method so we can look at it.

Pete
Sep 12 '07 #2

P: n/a
On Sep 12, 9:01 am, "Rotsey"
<malcolm_sm...@RemoveThis.optusnet.com.auwrote:
ok Pete here it is.
<snip>

As far as I can see that doesn't contain any code specifying a
DockStyle of Fill.

Jon

Sep 12 '07 #3

P: n/a
I did respond to your original e-mail; if it didn't work, then you
should have replied...

http://groups.google.co.uk/group/mic...ce51ecfd5f46cc

Marc
Sep 12 '07 #4

P: n/a
Well I deleted the menustrip and readded it but still the same problem.

have to say that I mislead you a little in that yes the browser
control is added at runtime.

So what I did was added a panel to the form (design view)
and dock fill it.

Then i add my browser to the panel it works fine.

So I do not know what was wrong.

But I thankyou all for your replies.

rotsey

"Rotsey" <ma***********@RemoveThis.optusnet.com.auwrote in message
news:OH**************@TK2MSFTNGP04.phx.gbl...
Hi,

I have not had a good answer to this question.

I put a menustrip on a form and so it is a main menu in affect.

Now I put a webbrowser control on the form and set it dock fill.

Of course what happens is the menu covers the top of the webbrowser
control
which i do not want.

Is there a property to have the control automatically drop
so it is aligned with the bottom of the menu??

Or do i have to set the top property and anchor the control etc
to achieve this, seems wrong to have to.

rotsey


Sep 12 '07 #5

P: n/a
Rotsey wrote:
Thanks for the lesson on learning Pete.

By the way what newsgroup reader do you use.
I'm currently using Thunderbird on my Mac. Since I've yet to find a
newsreader that I think is perfect, I switch around now and then. :)
Are you able to get email notifications of posts with it??
Not that I'm aware of. I've never seen a non-web-based newsreader that
provides email alerts. Thunderbird does include a setting to play a
sound when new messages are detected, but I don't think it's
configurable on a per-thread or per-reply basis.

If you read these newsgroups via Microsoft's web interface, I believe it
includes a setting to send you email when a reply to a post has been
made. So if you're looking for that, you might consider using that
interface.

Pete
Sep 13 '07 #6

P: n/a
I use Outlook express currently.

I am just googling for the Microsft's web base reader and cannot find a link
to it
anywhere.

You sure it exists?

"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:13*************@corp.supernews.com...
Rotsey wrote:
>Thanks for the lesson on learning Pete.

By the way what newsgroup reader do you use.

I'm currently using Thunderbird on my Mac. Since I've yet to find a
newsreader that I think is perfect, I switch around now and then. :)
>Are you able to get email notifications of posts with it??

Not that I'm aware of. I've never seen a non-web-based newsreader that
provides email alerts. Thunderbird does include a setting to play a sound
when new messages are detected, but I don't think it's configurable on a
per-thread or per-reply basis.

If you read these newsgroups via Microsoft's web interface, I believe it
includes a setting to send you email when a reply to a post has been made.
So if you're looking for that, you might consider using that interface.

Pete

Sep 13 '07 #7

P: n/a
Rotsey wrote:
I use Outlook express currently.

I am just googling for the Microsft's web base reader and cannot find a link
to it
anywhere.

You sure it exists?
Yes, of course.

http://www.microsoft.com/communities...nguages.csharp
Sep 13 '07 #8

P: n/a
Ok thanks.

What country are you from Pete, you seem to be the same time zone as me.??

Are you a .net developer for a living?

"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:13*************@corp.supernews.com...
Rotsey wrote:
>I use Outlook express currently.

I am just googling for the Microsft's web base reader and cannot find a
link to it
anywhere.

You sure it exists?

Yes, of course.

http://www.microsoft.com/communities...nguages.csharp

Sep 13 '07 #9

P: n/a
Rotsey wrote:
Ok thanks.

What country are you from Pete, you seem to be the same time zone as me.??
Assuming your .au top-level domain is any indication, I'm not. :)
Are you a .net developer for a living?
No.
Sep 13 '07 #10

P: n/a
Up a bit late for the US, so hmmmm.

You do this for fun, and are a Mac enthusiast.
"Peter Duniho" <Np*********@NnOwSlPiAnMk.comwrote in message
news:13*************@corp.supernews.com...
Rotsey wrote:
>Ok thanks.

What country are you from Pete, you seem to be the same time zone as
me.??

Assuming your .au top-level domain is any indication, I'm not. :)
>Are you a .net developer for a living?

No.

Sep 13 '07 #11

P: n/a
Can I suggest a pragmatic solution here?

When you have your main elements (designer or runtime; no difference),
add a Panel to the form, and set that to Dock so that it fits snugly.

This Panel represents the remaining area; now you can add whatever
Controls you want (to the Panel), be they docked, anchored or
floating - they should end up where you want them to.

This approach simply removes a layer of complexity, as the 27 new
Controls don't care about the menu etc - they just care that they
position themselves relative to their container, the Panel. And we
only had to get the Panel right once.

Marc
Sep 13 '07 #12

P: n/a
Thanks Marc but that's what I did, great minds think alike.

You didn't read the previous posts.
"Marc Gravell" <ma**********@gmail.comwrote in message
news:eY*************@TK2MSFTNGP06.phx.gbl...
Can I suggest a pragmatic solution here?

When you have your main elements (designer or runtime; no difference), add
a Panel to the form, and set that to Dock so that it fits snugly.

This Panel represents the remaining area; now you can add whatever
Controls you want (to the Panel), be they docked, anchored or floating -
they should end up where you want them to.

This approach simply removes a layer of complexity, as the 27 new Controls
don't care about the menu etc - they just care that they position
themselves relative to their container, the Panel. And we only had to get
the Panel right once.

Marc

Sep 14 '07 #13

This discussion thread is closed

Replies have been disabled for this discussion.