I have a very basic program, but for some reason I can't get it to behave
properly.
What I want is a basic form with a TabControl that fills the entire form.
The tab control should have 4 tabs with a single PropertyGrid control on
each tab that fills it's parent's tab page's client area.
Here's what I did.
1. Create a new project.
2. Add a TabControl to it, set its docking property to "Fill"
3. Add four tabs
4. Add a PropertyGrid to each tab and set the ProperyGrid's docking
property to "Fill".
In the designer, it displays properly when you switch tabs, but when you
actually run the program, only the very last PropertyGrid control that was
added displays properly.
It appears that all but the very last PropertyGrid control is sizing to the
area of the Form instead of its container.
Am I missing something? It does not do this with other controls I have
tried, just the PropertyGrid.
Terry 6 2874
Yes, the toolbar and help area of the PropertyGrid controls are not visible
on those tabs that it isn't sizing properly.
I found that if I go to any tab and bring that PG control to the front, that
PG will display properly and the others will not.
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:uj**************@TK2MSFTNGP12.phx.gbl... Terry, I created a little test form in VS.NET 2003 (C#).
It seems to be mostly correct. The first property grid shows the toolbar & help pane, property grids 2 - 4 do not.
Are you seeing the grid sizing incorrectly or the help & toolbar missing?
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:es**************@TK2MSFTNGP10.phx.gbl... I have a very basic program, but for some reason I can't get it to
behave properly.
What I want is a basic form with a TabControl that fills the entire
form. The tab control should have 4 tabs with a single PropertyGrid control on each tab that fills it's parent's tab page's client area.
Here's what I did.
1. Create a new project. 2. Add a TabControl to it, set its docking property to "Fill" 3. Add four tabs 4. Add a PropertyGrid to each tab and set the ProperyGrid's docking property to "Fill".
In the designer, it displays properly when you switch tabs, but when you actually run the program, only the very last PropertyGrid control that
was added displays properly.
It appears that all but the very last PropertyGrid control is sizing to the area of the Form instead of its container.
Am I missing something? It does not do this with other controls I have tried, just the PropertyGrid.
Terry
Terry,
Which version of the framework?
With VS 2003 (.NET 1.1) it seems to size correctly, it just seems to only
want one to show the Help & Toolbar, based on the designer, I can manually
set the options and they stick.
I'll have to try with VB.NET.
Hope this helps
Jay
"Terry" <ch**********@hotmail.com> wrote in message
news:uL**************@TK2MSFTNGP12.phx.gbl... Yes, the toolbar and help area of the PropertyGrid controls are not
visible on those tabs that it isn't sizing properly. I found that if I go to any tab and bring that PG control to the front,
that PG will display properly and the others will not.
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
message news:uj**************@TK2MSFTNGP12.phx.gbl... Terry, I created a little test form in VS.NET 2003 (C#).
It seems to be mostly correct. The first property grid shows the toolbar
& help pane, property grids 2 - 4 do not.
Are you seeing the grid sizing incorrectly or the help & toolbar
missing? Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:es**************@TK2MSFTNGP10.phx.gbl... I have a very basic program, but for some reason I can't get it to behave properly.
What I want is a basic form with a TabControl that fills the entire form. The tab control should have 4 tabs with a single PropertyGrid control
on each tab that fills it's parent's tab page's client area.
Here's what I did.
1. Create a new project. 2. Add a TabControl to it, set its docking property to "Fill" 3. Add four tabs 4. Add a PropertyGrid to each tab and set the ProperyGrid's docking property to "Fill".
In the designer, it displays properly when you switch tabs, but when
you actually run the program, only the very last PropertyGrid control that was added displays properly.
It appears that all but the very last PropertyGrid control is sizing
to the area of the Form instead of its container.
Am I missing something? It does not do this with other controls I
have tried, just the PropertyGrid.
Terry
Yes, I am using VS .NET 2003 and .NET framework 1.1.
When you say "size correctly" do you mean that you can see the toolbar and
the help area in all of the tabs at runtime? The PG controls are all
resizing properly, but on all but one of the tabs, the toolbar and the help
area are missing. Just a white client area.
At this point, I do not have an object assigned to the "SelectedObject"
property. It's just the main form, the tab control, four tabs and four
PropertyGrid controls.
I've made the project available here
( http://www.sciencedrive.com/ServerIn...stPropGrid.zip ) if you'd
like to take a look at it. It has the project and my compiled Debug binary.
Thanks,
Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:ep*************@TK2MSFTNGP12.phx.gbl... Terry, Which version of the framework?
With VS 2003 (.NET 1.1) it seems to size correctly, it just seems to only want one to show the Help & Toolbar, based on the designer, I can manually set the options and they stick.
I'll have to try with VB.NET.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:uL**************@TK2MSFTNGP12.phx.gbl... Yes, the toolbar and help area of the PropertyGrid controls are not visible on those tabs that it isn't sizing properly. I found that if I go to any tab and bring that PG control to the front, that PG will display properly and the others will not.
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message news:uj**************@TK2MSFTNGP12.phx.gbl... Terry, I created a little test form in VS.NET 2003 (C#).
It seems to be mostly correct. The first property grid shows the
toolbar & help pane, property grids 2 - 4 do not.
Are you seeing the grid sizing incorrectly or the help & toolbar missing? Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:es**************@TK2MSFTNGP10.phx.gbl... > I have a very basic program, but for some reason I can't get it to behave > properly. > > What I want is a basic form with a TabControl that fills the entire form. > The tab control should have 4 tabs with a single PropertyGrid
control on > each tab that fills it's parent's tab page's client area. > > Here's what I did. > > 1. Create a new project. > 2. Add a TabControl to it, set its docking property to "Fill" > 3. Add four tabs > 4. Add a PropertyGrid to each tab and set the ProperyGrid's docking > property to "Fill". > > In the designer, it displays properly when you switch tabs, but when you > actually run the program, only the very last PropertyGrid control
that was > added displays properly. > > It appears that all but the very last PropertyGrid control is sizing to the > area of the Form instead of its container. > > Am I missing something? It does not do this with other controls I have > tried, just the PropertyGrid. > > Terry > >
Terry, When you say "size correctly" do you mean that you can see the toolbar and the help area in all of the tabs at runtime? The PG controls are all resizing properly,
Yes, the property grid remains docked correctly its size changes with the
size of the tab control.
but on all but one of the tabs, the toolbar and the help area are missing. Just a white client area.
This is what I am seeing also, the 'first' grid displays the toolbar & help.
The other grids do not. I have not decided what constitutes the 'first'
grid, I did something yesterday and the 'first' grid became grid4.
I am going to try this in VB.NET to see if its something with the forms
designer. If you look at the generated code in the form, the others all have
the options explicitly turned off. If I add code after the
initializecomponent in the constructor to turn the options back on, all the
grids display the toolbar & help as expected. This leads me to believe the
forms designer, the property grid, or one of its attributes is doing
something at design time, as to have the options turned off in the generated
code.
Hope this helps
Jay
"Terry" <ch**********@hotmail.com> wrote in message
news:Ov*************@TK2MSFTNGP10.phx.gbl... Yes, I am using VS .NET 2003 and .NET framework 1.1.
When you say "size correctly" do you mean that you can see the toolbar and the help area in all of the tabs at runtime? The PG controls are all resizing properly, but on all but one of the tabs, the toolbar and the
help area are missing. Just a white client area.
At this point, I do not have an object assigned to the "SelectedObject" property. It's just the main form, the tab control, four tabs and four PropertyGrid controls.
I've made the project available here (http://www.sciencedrive.com/ServerIn...stPropGrid.zip ) if you'd like to take a look at it. It has the project and my compiled Debug
binary. Thanks, Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
message news:ep*************@TK2MSFTNGP12.phx.gbl... Terry, Which version of the framework?
With VS 2003 (.NET 1.1) it seems to size correctly, it just seems to
only want one to show the Help & Toolbar, based on the designer, I can
manually set the options and they stick.
I'll have to try with VB.NET.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:uL**************@TK2MSFTNGP12.phx.gbl... Yes, the toolbar and help area of the PropertyGrid controls are not visible on those tabs that it isn't sizing properly. I found that if I go to any tab and bring that PG control to the
front, that PG will display properly and the others will not.
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message news:uj**************@TK2MSFTNGP12.phx.gbl... > Terry, > I created a little test form in VS.NET 2003 (C#). > > It seems to be mostly correct. The first property grid shows the toolbar & > help pane, property grids 2 - 4 do not. > > Are you seeing the grid sizing incorrectly or the help & toolbar missing? > > Hope this helps > Jay > > "Terry" <ch**********@hotmail.com> wrote in message > news:es**************@TK2MSFTNGP10.phx.gbl... > > I have a very basic program, but for some reason I can't get it to behave > > properly. > > > > What I want is a basic form with a TabControl that fills the
entire form. > > The tab control should have 4 tabs with a single PropertyGrid
control on > > each tab that fills it's parent's tab page's client area. > > > > Here's what I did. > > > > 1. Create a new project. > > 2. Add a TabControl to it, set its docking property to "Fill" > > 3. Add four tabs > > 4. Add a PropertyGrid to each tab and set the ProperyGrid's
docking > > property to "Fill". > > > > In the designer, it displays properly when you switch tabs, but
when you > > actually run the program, only the very last PropertyGrid control that was > > added displays properly. > > > > It appears that all but the very last PropertyGrid control is
sizing to > the > > area of the Form instead of its container. > > > > Am I missing something? It does not do this with other controls I have > > tried, just the PropertyGrid. > > > > Terry > > > > > >
Thanks for looking at this. I was getting quite frustrated. :-)
I'll take a look at it and add some code to reset the options. I can't
believe I didn't notice that the generated code had those options turned
off! I was focusing on the TabPage settings and wasn't paying enough
attention to the PG control settings.
Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:e%****************@tk2msftngp13.phx.gbl... Terry, When you say "size correctly" do you mean that you can see the toolbar
and the help area in all of the tabs at runtime? The PG controls are all resizing properly, Yes, the property grid remains docked correctly its size changes with the size of the tab control.
but on all but one of the tabs, the toolbar and the help area are missing. Just a white client area. This is what I am seeing also, the 'first' grid displays the toolbar &
help. The other grids do not. I have not decided what constitutes the 'first' grid, I did something yesterday and the 'first' grid became grid4.
I am going to try this in VB.NET to see if its something with the forms designer. If you look at the generated code in the form, the others all
have the options explicitly turned off. If I add code after the initializecomponent in the constructor to turn the options back on, all
the grids display the toolbar & help as expected. This leads me to believe the forms designer, the property grid, or one of its attributes is doing something at design time, as to have the options turned off in the
generated code.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:Ov*************@TK2MSFTNGP10.phx.gbl... Yes, I am using VS .NET 2003 and .NET framework 1.1.
When you say "size correctly" do you mean that you can see the toolbar
and the help area in all of the tabs at runtime? The PG controls are all resizing properly, but on all but one of the tabs, the toolbar and the help area are missing. Just a white client area.
At this point, I do not have an object assigned to the "SelectedObject" property. It's just the main form, the tab control, four tabs and four PropertyGrid controls.
I've made the project available here (http://www.sciencedrive.com/ServerIn...stPropGrid.zip ) if
you'd like to take a look at it. It has the project and my compiled Debug binary. Thanks, Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
message news:ep*************@TK2MSFTNGP12.phx.gbl... Terry, Which version of the framework?
With VS 2003 (.NET 1.1) it seems to size correctly, it just seems to only want one to show the Help & Toolbar, based on the designer, I can manually set the options and they stick.
I'll have to try with VB.NET.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:uL**************@TK2MSFTNGP12.phx.gbl... > Yes, the toolbar and help area of the PropertyGrid controls are not visible > on those tabs that it isn't sizing properly. > I found that if I go to any tab and bring that PG control to the front, that > PG will display properly and the others will not. > > > "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message > news:uj**************@TK2MSFTNGP12.phx.gbl... > > Terry, > > I created a little test form in VS.NET 2003 (C#). > > > > It seems to be mostly correct. The first property grid shows the toolbar & > > help pane, property grids 2 - 4 do not. > > > > Are you seeing the grid sizing incorrectly or the help & toolbar missing? > > > > Hope this helps > > Jay > > > > "Terry" <ch**********@hotmail.com> wrote in message > > news:es**************@TK2MSFTNGP10.phx.gbl... > > > I have a very basic program, but for some reason I can't get it
to > behave > > > properly. > > > > > > What I want is a basic form with a TabControl that fills the entire > form. > > > The tab control should have 4 tabs with a single PropertyGrid control on > > > each tab that fills it's parent's tab page's client area. > > > > > > Here's what I did. > > > > > > 1. Create a new project. > > > 2. Add a TabControl to it, set its docking property to "Fill" > > > 3. Add four tabs > > > 4. Add a PropertyGrid to each tab and set the ProperyGrid's docking > > > property to "Fill". > > > > > > In the designer, it displays properly when you switch tabs, but when you > > > actually run the program, only the very last PropertyGrid
control that > was > > > added displays properly. > > > > > > It appears that all but the very last PropertyGrid control is sizing to > > the > > > area of the Form instead of its container. > > > > > > Am I missing something? It does not do this with other controls
I have > > > tried, just the PropertyGrid. > > > > > > Terry > > > > > > > > > > > >
Thanks for looking at this. I was getting quite frustrated. :-)
I'll take a look at it and add some code to reset the options. I can't
believe I didn't notice that the generated code had those options turned
off! I was focusing on the TabPage settings and wasn't paying enough
attention to the PG control settings.
Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message
news:e%****************@tk2msftngp13.phx.gbl... Terry, When you say "size correctly" do you mean that you can see the toolbar
and the help area in all of the tabs at runtime? The PG controls are all resizing properly, Yes, the property grid remains docked correctly its size changes with the size of the tab control.
but on all but one of the tabs, the toolbar and the help area are missing. Just a white client area. This is what I am seeing also, the 'first' grid displays the toolbar &
help. The other grids do not. I have not decided what constitutes the 'first' grid, I did something yesterday and the 'first' grid became grid4.
I am going to try this in VB.NET to see if its something with the forms designer. If you look at the generated code in the form, the others all
have the options explicitly turned off. If I add code after the initializecomponent in the constructor to turn the options back on, all
the grids display the toolbar & help as expected. This leads me to believe the forms designer, the property grid, or one of its attributes is doing something at design time, as to have the options turned off in the
generated code.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:Ov*************@TK2MSFTNGP10.phx.gbl... Yes, I am using VS .NET 2003 and .NET framework 1.1.
When you say "size correctly" do you mean that you can see the toolbar
and the help area in all of the tabs at runtime? The PG controls are all resizing properly, but on all but one of the tabs, the toolbar and the help area are missing. Just a white client area.
At this point, I do not have an object assigned to the "SelectedObject" property. It's just the main form, the tab control, four tabs and four PropertyGrid controls.
I've made the project available here (http://www.sciencedrive.com/ServerIn...stPropGrid.zip ) if
you'd like to take a look at it. It has the project and my compiled Debug binary. Thanks, Terry
"Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in
message news:ep*************@TK2MSFTNGP12.phx.gbl... Terry, Which version of the framework?
With VS 2003 (.NET 1.1) it seems to size correctly, it just seems to only want one to show the Help & Toolbar, based on the designer, I can manually set the options and they stick.
I'll have to try with VB.NET.
Hope this helps Jay
"Terry" <ch**********@hotmail.com> wrote in message news:uL**************@TK2MSFTNGP12.phx.gbl... > Yes, the toolbar and help area of the PropertyGrid controls are not visible > on those tabs that it isn't sizing properly. > I found that if I go to any tab and bring that PG control to the front, that > PG will display properly and the others will not. > > > "Jay B. Harlow [MVP - Outlook]" <Ja********@email.msn.com> wrote in message > news:uj**************@TK2MSFTNGP12.phx.gbl... > > Terry, > > I created a little test form in VS.NET 2003 (C#). > > > > It seems to be mostly correct. The first property grid shows the toolbar & > > help pane, property grids 2 - 4 do not. > > > > Are you seeing the grid sizing incorrectly or the help & toolbar missing? > > > > Hope this helps > > Jay > > > > "Terry" <ch**********@hotmail.com> wrote in message > > news:es**************@TK2MSFTNGP10.phx.gbl... > > > I have a very basic program, but for some reason I can't get it
to > behave > > > properly. > > > > > > What I want is a basic form with a TabControl that fills the entire > form. > > > The tab control should have 4 tabs with a single PropertyGrid control on > > > each tab that fills it's parent's tab page's client area. > > > > > > Here's what I did. > > > > > > 1. Create a new project. > > > 2. Add a TabControl to it, set its docking property to "Fill" > > > 3. Add four tabs > > > 4. Add a PropertyGrid to each tab and set the ProperyGrid's docking > > > property to "Fill". > > > > > > In the designer, it displays properly when you switch tabs, but when you > > > actually run the program, only the very last PropertyGrid
control that > was > > > added displays properly. > > > > > > It appears that all but the very last PropertyGrid control is sizing to > > the > > > area of the Form instead of its container. > > > > > > Am I missing something? It does not do this with other controls
I have > > > tried, just the PropertyGrid. > > > > > > Terry > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Liz |
last post by:
I am trying to add a label to a tab page
tabMain.TabPages.Controls.Add(aLabel);
and get an error "specified argument was out of the range
of valid values.
Any ideas???
|
by: James Geurts |
last post by:
Hey all... I posted this in the vs.net ide group too, but people are not answering, so I figured that it might be more appropriate here. I'm not sure if I'm adding a designer to my code properly. ...
|
by: scorpion53061 |
last post by:
Well as some of you know I was using a tab control for a project I was
building for my boss.
Today he tells me that he wants:
When he switches tabs to be able to switch back and see whatever...
|
by: Tom McL. |
last post by:
My Program has two forms From1 and Form2.
On From1 I have a TabControl1 witch has
8 tabs currently. I would like to add a new
tab from Form2 is this possible?
I have tried the following code on...
|
by: Richard |
last post by:
I have a form with seven tapages. These span only one record with a
large number of fields (textboxes).
On Tabpage1 I display a number of read-only text boxes. This displays
information about...
|
by: TN |
last post by:
I can add a button to a TabPage, how come I can't add a Form? The Form
never gets realized on the page, but a button can :-(
f = new System.Windows.Forms.Form();
b = new Button();
b.Text =...
|
by: Steve Teeples |
last post by:
Can someone show me an example of how to place a "CheckedListBox" property
within a PropertyGrid?
--
-----------
Thanks,
Steve
|
by: Pete Kane |
last post by:
Hi All, does anyone know how to add TabPages of ones own classes at design time ? ideally when adding a new TabControl it would
contain tab pages of my own classes, I know you can achieve this with...
|
by: ullner |
last post by:
I need to add two objects to a PropertyGrid, but when using SelectedObjects, the propertygrid only display those attributes that are common between the two objects. I've looked at CodeProject's...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |