tehon3299
Centurion
What should I use if I want to have a box with divided columns on a form? i.e. I want a column for Team Name, and Coach. What should I use?
lvwMain.ColumnHeaders.Add , , "Team", 4000
// Declare the SendMessage API to set the tab stops
// You can put this at the top of a form
private const int LB_SETTABSTOPS = 0x192;
[DllImport("user32", EntryPoint="SendMessage")]
private static extern int SendMessageTabStops(int handle, int msg, int tabCount, int[] tabStops);
// ... in Form_Load:
int[] tabStops = new int[] {0, 50, 100};
listBox1.Items.Add("dan\tjones\tMe");
listBox1.Items.Add("bob\tjones\tHim");
listBox1.Items.Add("hagatha\tjones\tHer");
SendMessageTabStops(listBox1.Handle.ToInt32(), LB_SETTABSTOPS, tabStops.Length, tabStops);