Home All Groups Group Topic Archive Search About

[Newbie] Customize Anchor properties ?

Author
3 Oct 2006 10:01 AM
Stéphane_Miqueu
Hi,
Sorry for my english, i'm a french newbie in vb.net.

Here is my problem :
In a window, I have 3 datagrid. I'm looking for a way to customize the
anchor properties to make my datagrid #2 and #3 going down
'proportionaly' when I resize the window.

To summerize, if I expand the window, I want my datagrids growing of
1/3, datagrid #2 going down of 1/3 and datagrid #3 going down of 2/3.

Currently I'm using a french developping tool that allow that sort of
thing without coding anything and I can not find it in VB.NET. Am I
blind ?

--
Ami Calmant
Stéphane

Author
3 Oct 2006 1:00 PM
Izzy
I used a datagridview and placed 3 on a form. Grid A is at the top of
the form and grids B and C are under grid A placed next to each other.

If I anchor grids B and C to the Top, Bottom they expand
proportionately with the bottom of the form and hold their upper
position just under grid A.

Does this help?

Izzy


Stéphane Miqueu wrote:
Show quoteHide quote
> Hi,
> Sorry for my english, i'm a french newbie in vb.net.
>
> Here is my problem :
> In a window, I have 3 datagrid. I'm looking for a way to customize the
> anchor properties to make my datagrid #2 and #3 going down
> 'proportionaly' when I resize the window.
>
> To summerize, if I expand the window, I want my datagrids growing of
> 1/3, datagrid #2 going down of 1/3 and datagrid #3 going down of 2/3.
>
> Currently I'm using a french developping tool that allow that sort of
> thing without coding anything and I can not find it in VB.NET. Am I
> blind ?
>
> --
> Ami Calmant
> Stéphane
Author
3 Oct 2006 1:38 PM
Stéphane_Miqueu
Izzy avait écrit le 03/10/2006 :
> I used a datagridview and placed 3 on a form. Grid A is at the top of
> the form and grids B and C are under grid A placed next to each other.
>
> If I anchor grids B and C to the Top, Bottom they expand
> proportionately with the bottom of the form and hold their upper
> position just under grid A.
>
> Does this help?
>
> Izzy
>
Thanks for answer.
Unfortunately it doesn't help. In my window, there is grib A and under
grib B and under grid C. They all have the same size (width and
height).
So when I resize my window I want all the grids to resize of 33%, grid
C to move bottom of 66% and grid B to move bottom of 33%.

If I'm not clear, I can mail the form.

--
Ami Calmant
Stéphane
Author
3 Oct 2006 1:56 PM
Izzy
Ok here is how you can do this:

Add a Table Layout Panel to the form, by default it will have 2 rows
and 2 columns.

Right click on the Table Layout Panel and select "Column" then
"Delete".
Now you should only have 2 rows, right click on the Table Layout Panel
and select "Row" then "Add".

Now you should have 3 rows. Add Grid A to the 1st row, Grid B to the
2nd row, and Grid C to the 3rd row.

Set the "Dock" property of each grid to "Fill"

Now click on the Table Layout Panel to select it and click in the
"Rows" collection property, when the button appears, click it.

Once in the rows collection of the Table Layout Panel, you can set each
row to whatever Size percent you want.

Let me know if you want me too send you my sample project.

Izzy


Stéphane Miqueu wrote:
Show quoteHide quote
> Izzy avait écrit le 03/10/2006 :
> > I used a datagridview and placed 3 on a form. Grid A is at the top of
> > the form and grids B and C are under grid A placed next to each other.
> >
> > If I anchor grids B and C to the Top, Bottom they expand
> > proportionately with the bottom of the form and hold their upper
> > position just under grid A.
> >
> > Does this help?
> >
> > Izzy
> >
> Thanks for answer.
> Unfortunately it doesn't help. In my window, there is grib A and under
> grib B and under grid C. They all have the same size (width and
> height).
> So when I resize my window I want all the grids to resize of 33%, grid
> C to move bottom of 66% and grid B to move bottom of 33%.
>
> If I'm not clear, I can mail the form.
>
> --
> Ami Calmant
> Stéphane
Author
16 Oct 2006 9:25 AM
Stéphane_Miqueu
Izzy avait énoncé :
Show quoteHide quote
> Ok here is how you can do this:
>
> Add a Table Layout Panel to the form, by default it will have 2 rows
> and 2 columns.
>
> Right click on the Table Layout Panel and select "Column" then
> "Delete".
> Now you should only have 2 rows, right click on the Table Layout Panel
> and select "Row" then "Add".
>
> Now you should have 3 rows. Add Grid A to the 1st row, Grid B to the
> 2nd row, and Grid C to the 3rd row.
>
> Set the "Dock" property of each grid to "Fill"
>
> Now click on the Table Layout Panel to select it and click in the
> "Rows" collection property, when the button appears, click it.
>
> Once in the rows collection of the Table Layout Panel, you can set each
> row to whatever Size percent you want.
>
> Let me know if you want me too send you my sample project.
>
> Izzy
>
>
> Stéphane Miqueu wrote:
>> Izzy avait écrit le 03/10/2006 :
>>> I used a datagridview and placed 3 on a form. Grid A is at the top of
>>> the form and grids B and C are under grid A placed next to each other.
>>>
>>> If I anchor grids B and C to the Top, Bottom they expand
>>> proportionately with the bottom of the form and hold their upper
>>> position just under grid A.
>>>
>>> Does this help?
>>>
>>> Izzy
>>>
>> Thanks for answer.
>> Unfortunately it doesn't help. In my window, there is grib A and under
>> grib B and under grid C. They all have the same size (width and
>> height).
>> So when I resize my window I want all the grids to resize of 33%, grid
>> C to move bottom of 66% and grid B to move bottom of 33%.
>>
>> If I'm not clear, I can mail the form.
>>
>> --
>> Ami Calmant
>> Stéphane

Thanks for your answer. I'm back from holiday and I will try this ASAP.
I keep your email just in case ....

--
Ami Calmant
Stéphane
Author
16 Oct 2006 12:32 PM
Stéphane_Miqueu
Izzy a formulé ce mardi :
Show quoteHide quote
> Ok here is how you can do this:
>
> Add a Table Layout Panel to the form, by default it will have 2 rows
> and 2 columns.
>
> Right click on the Table Layout Panel and select "Column" then
> "Delete".
> Now you should only have 2 rows, right click on the Table Layout Panel
> and select "Row" then "Add".
>
> Now you should have 3 rows. Add Grid A to the 1st row, Grid B to the
> 2nd row, and Grid C to the 3rd row.
>
> Set the "Dock" property of each grid to "Fill"
>
> Now click on the Table Layout Panel to select it and click in the
> "Rows" collection property, when the button appears, click it.
>
> Once in the rows collection of the Table Layout Panel, you can set each
> row to whatever Size percent you want.
>
> Let me know if you want me too send you my sample project.
>
> Izzy
>
Thanks a lot, it's just great. :D

--
Ami Calmant
Stéphane