Hi,
When loading my form I want to position a tabcontrol depending of the width of a datagrid.
I do (on the form load event)
so, the tabcontrol should be on the same height as the datagrid. But its always a lot lower??
When I calc the values in the command window
?adresboekfrm.dgCursisten.Location.X + adresboekfrm.dgCursisten.Width --> 613
?adresboekfrm.dgCursisten.Location --> 107, 144
?adresboekfrm.TabControl1.Location --> 613 , 144
so, this means (to me) that according to the values, the tabcontrol is directly attached to the upperright corner of the datagrid. But in my for it is NOT??
Anyone ideas? what's the thing I'm doing wrong here?
thanks in advance
When loading my form I want to position a tabcontrol depending of the width of a datagrid.
I do (on the form load event)
VB.NET:
[COLOR=#008000]
'load the list
[/COLOR]LoadList()
[COLOR=#008000]
[/COLOR][COLOR=#008000]'add TableSyle
[/COLOR]tsCursistenInschrijvingen()
[COLOR=#008000]'calc our start coordinates X and Y AFTER we added the ts
[/COLOR][COLOR=#0000ff]Dim[/COLOR] intX [COLOR=#0000ff]As[/COLOR][COLOR=#0000ff]Integer[/COLOR] = [COLOR=#0000ff]Me[/COLOR].dgCursisten.Location.X + ([COLOR=#0000ff]Me[/COLOR].dgCursisten.Width)
[COLOR=#0000ff]Dim[/COLOR] intY [COLOR=#0000ff]As[/COLOR][COLOR=#0000ff]Integer[/COLOR] = [COLOR=#0000ff]Me[/COLOR].dgCursisten.Location.Y
[COLOR=#008000]'set new position of tabcontrol
[/COLOR][COLOR=#0000ff]Me[/COLOR].TabControl1.Location = [COLOR=#0000ff]New[/COLOR] Point(intX, intY)
so, the tabcontrol should be on the same height as the datagrid. But its always a lot lower??
When I calc the values in the command window
?adresboekfrm.dgCursisten.Location.X + adresboekfrm.dgCursisten.Width --> 613
?adresboekfrm.dgCursisten.Location --> 107, 144
?adresboekfrm.TabControl1.Location --> 613 , 144
so, this means (to me) that according to the values, the tabcontrol is directly attached to the upperright corner of the datagrid. But in my for it is NOT??
Anyone ideas? what's the thing I'm doing wrong here?
thanks in advance