Returns the tab's position and dimensions.
| VB | object.GetPosition(Left As Single, Top As Single, Width As Single, Height As Single) |
object
Left
Returns the location of the left edge of the tab described by object. The units used depend on the current coordinate system used (usually TWIPS).
Top
Returns the location of the top edge of the tab described by object. The units used depend on the current coordinate system used (usually TWIPS).
Width
Returns the width of the tab described by object. The units used depend on the current coordinate system used (usually TWIPS).
Height
Returns the height of the tab described by object. The units used depend on the current coordinate system used (usually TWIPS).
The GetPosition method returns the tab's position and dimensions.
The GetPosition and GetPositionPix properties are synonyms, but use different coordinate systems.
The Tabs.HitTest method can be used to determine which tab is at a given location.
Dim Left As Single, Top As Single, Width As Single, Height As Single
' we are over the tab control
If State = overSftTabs Then
If StartTabIndex >= 0 Then
' Find the insertion point and move the image there. Since we are
' inserting, we check if we're in the left or right half of the
' target tab and adjust the insertion point accordingly
If TargetTab >= 0 Then
SftTabs1.Tab(TargetTab).GetPosition Left, Top, Width, Height
If x >= Left + Width / 2 Then
TargetTab = TargetTab + 1
Left = Left + Width
End If
If DropTabIndex <> TargetTab Then
Image1.Left = Left - Image1.Width / 2
Image1.Top = TopSee Also SftTabsTab Object | Object Hierarchy