Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net LB_SETTABSTOPS似乎不会影响CheckedListBox_Vb.net_Winforms_Listbox_Checkedlistbox - Fatal编程技术网

Vb.net LB_SETTABSTOPS似乎不会影响CheckedListBox

Vb.net LB_SETTABSTOPS似乎不会影响CheckedListBox,vb.net,winforms,listbox,checkedlistbox,Vb.net,Winforms,Listbox,Checkedlistbox,我试图在WinForms应用程序的CheckedListBox中设置制表位,但无论我做什么,它似乎都没有任何效果。我的表格代码中包含以下内容: <DllImport("user32.dll")> _ Public Sub SendMessage(ByVal hWnd As IntPtr, ByVal uMsg As Int32, ByVal wParam As Int32, ByRef lParam As Int32) End Sub Public Const LB_SETTABS

我试图在WinForms应用程序的CheckedListBox中设置制表位,但无论我做什么,它似乎都没有任何效果。我的表格代码中包含以下内容:

<DllImport("user32.dll")> _
Public Sub SendMessage(ByVal hWnd As IntPtr, ByVal uMsg As Int32, ByVal wParam As Int32, ByRef lParam As Int32)
End Sub

Public Const LB_SETTABSTOPS As Int32 = &H192
稍后,我在循环中使用它,其中col1到col4都是列的字符串值:

theList.Items.Add(col1 & vbTab & col2 & vbTab & col3 & vbTab & col4)
但是,无论我对tabStops的值使用什么,列表的格式都是标准宽度的tabStops

theList.CustomTabOffsets.AddRange({40, 140, 240})
theList.UseCustomTabOffsets = True

theList.Items.Add(col1 & vbTab & col2 & vbTab & col3 & vbTab & col4)

有点晚了,但是
theList.CustomTabOffsets.AddRange({40, 140, 240})
theList.UseCustomTabOffsets = True

theList.Items.Add(col1 & vbTab & col2 & vbTab & col3 & vbTab & col4)