S
SamSpade
Public Property TxtTabSpacing() As Integer
Get
Dim lTabPos(31) As Integer 'Max allowed is 32 tabs
lTabPos = RichTextBox1.SelectionTabs()
TxtTabSpacing = lTabPos(0)
End Get
Set(ByVal TabLength As Integer)
Try
'Set a tab every TabLength
Dim lTabPos(31) As Integer
Dim lLpCnt As Integer
For lLpCnt = 0 To lTabPos.Length - 1
lTabPos(lLpCnt) = TabLength * (lLpCnt + 1)
Next
RichTextBox1.SelectionTabs = lTabPos
Catch
End Try
End Set
End Property
Compiler says:
Code generation for property 'TxtTabSpacing' failed. Error was: 'Index was
outside the bounds of the array.'
Thanks for any help
PS
I think the help for
RichTextBox.SelectionTabs Property [Visual Basic]
is wrong. It says for Exception Type:
The specified value is less than 0 or greater than 32.
I think it means the array lenght must not be greater that 32
Get
Dim lTabPos(31) As Integer 'Max allowed is 32 tabs
lTabPos = RichTextBox1.SelectionTabs()
TxtTabSpacing = lTabPos(0)
End Get
Set(ByVal TabLength As Integer)
Try
'Set a tab every TabLength
Dim lTabPos(31) As Integer
Dim lLpCnt As Integer
For lLpCnt = 0 To lTabPos.Length - 1
lTabPos(lLpCnt) = TabLength * (lLpCnt + 1)
Next
RichTextBox1.SelectionTabs = lTabPos
Catch
End Try
End Set
End Property
Compiler says:
Code generation for property 'TxtTabSpacing' failed. Error was: 'Index was
outside the bounds of the array.'
Thanks for any help
PS
I think the help for
RichTextBox.SelectionTabs Property [Visual Basic]
is wrong. It says for Exception Type:
The specified value is less than 0 or greater than 32.
I think it means the array lenght must not be greater that 32