Skip to content

Instantly share code, notes, and snippets.

@Willy-Kimura
Last active November 17, 2017 14:11
Show Gist options
  • Save Willy-Kimura/f723f0b66063079fe477f34c4a100e84 to your computer and use it in GitHub Desktop.
Save Willy-Kimura/f723f0b66063079fe477f34c4a100e84 to your computer and use it in GitHub Desktop.
This adds a list of TaskItems inside our task-list panel section.
' This adds a new TaskItem inside our task-list panel section.
Sub AddTask(ByVal task_label As TaskItem.TaskLabels, ByVal show_separator As Boolean, ByVal task_subject As String, ByVal task_title As String, ByVal task_subtitle As String)
' Create a new TaskItem and set the required parameters with the "Add" method.
Dim task_item As New TaskItem
task_item.Add(task_label, show_separator, task_subject, task_title, task_subtitle)
' Then set the TaskItem's Dock property to "Top".
task_item.Dock = DockStyle.Top
' Add the TaskItem to the Panel.
Panel1.Controls.Add(task_item)
' Finally, bring the TaskItem to the front to avoid disarrangements.
task_item.BringToFront()
End Sub
' Add a list of pre-defined TaskItems.
Sub AddTasks()
AddTask(TaskItem.TaskLabels.General, True, "EMAIL", "Send over investment documents", "Assigned to Mark R. - Added 12 Jun 2014")
AddTask(TaskItem.TaskLabels.General, True, "DOCUMENT", "Prepare for a bi-weekly meeting to discuss new features", "Assigned to Amy G. - Added 12 Jun 2014")
AddTask(TaskItem.TaskLabels.Important, True, "SCHEDULE - OVERDUE FOR 3 DAYS", "Schedule a call with Claudia for Thursday", "Assigned to Quinn T. - Added 12 Jun 2014")
AddTask(TaskItem.TaskLabels.Finished, True, "EMAIL", "Send over investment documents", "Assigned to Mark R. - Added 12 Jun 2014")
AddTask(TaskItem.TaskLabels.General, False, "BOOKING", "Register client for Monday meeting", "Assigned to James P. - Added 12 Jun 2014")
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment