Re: BindingNavigator Location

Tech-Archive recommends: Fix windows errors by optimizing your registry



Thanks Linda,

That does work. The only question is - will VS at some point change it back?
There is the warning at the top of the method ...
'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

--

AG
Email: discuss at adhdata dot com



"Linda Liu [MSFT]" <v-lliu@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:1V%23u8yKsGHA.2500@xxxxxxxxxxxxxxxxxxxxxxxx
Hi AG,

Thanks for your update.

I have performed a test and did see the problem that you decribed. The
BindingNavigator is above the ToolStrip that VS adds to the form.

If I set the BindingNavigator's Dock property to None, the ToolStrip moves
to the top border of the form. Then if I set the BindingNavigator's Dock
property to Top again, the BindingNavigator becomes above the ToolStrip
again.

I think this is because the ToolStrip is added to the form after the
BindingNavigator by VS. Then I have a try exchanging the code of adding
the
ToolStrip to the form's Controls collection and that of adding
BindingNavigator in the InitializeComponent method in the form.designer
file.

In my test, the code of adding the ToolStrip to the form is
"this.Controls.Add(this.fillToolStrip);"
and that of adding the BindingNavigator is
"this.Controls.Add(this.getCityBindingNavigator);"

What I do is just exchanges the places of two statements. It works. Switch
to the form's designer, the ToolStrip becomes above the BindingNavigator
now.

Hope it helps.
If you have anything unclear, please feel free to let me know.


Sincerely,
Linda Liu
Microsoft Online Community Support




.



Relevant Pages

  • Re: BindingNavigator Location
    ... BindingNavigator is above the ToolStrip that VS adds to the form. ... If I set the BindingNavigator's Dock property to None, ... Then I have a try exchanging the code of adding the ...
    (microsoft.public.dotnet.framework.windowsforms)
  • BindingNavigator Location
    ... controls including a bindingnavigator and toolstrip. ... The bindingnavigator is located above the toolstrip and I would like to have ... soon as I leave the location row. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • BindingNavigator Location
    ... controls including a bindingnavigator and toolstrip. ... The bindingnavigator is located above the toolstrip and I would like to have ... soon as I leave the location row. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: ToolStripControl is now 2D flat after changing background color
    ... toolbar is set ("Windows Form Designer generated code" section. ... > After I changed the color of a ToolStrip Control from "control" to a ... > This ToolStrip took forever to name each button and event - I don't want ...
    (microsoft.public.dotnet.framework.windowsforms.controls)