Hi all,
I wish to have an existing menu appear on a popup menu as a child of a popup option.
I create a popup menu dynamically loading each of the option in a loop. when the user mouses over an option I wish for a child menu to appear. The child menu is a menu that is already in existance on my form.
Can anyone please help me attach an existing menu to a dynamically created menu option.
This is the code I am using to add the menu items
Code:
If VennLineDriverPupJob.Item(Index).ToolTipText = MutiplePickupsToolTip Then
'The pickup is a multiple show the choice for this time slot.
thisDate = VennDrivers(counter).Job(counter2).PickUpDate
thisTime = VennDrivers(counter).Job(counter2).PickUpTime
counter4 = 0
'Remove any pickups in the list
For counter3 = 1 To mnuSelectedPickup.UBound
Unload frmMain.mnuSelectedPickup(counter3)
Next
'Get the pickups which have the same pickup time
For counter3 = 0 To UBound(VennDrivers(counter).Job)
If VennDrivers(counter).Job(counter3).PickUpDate = thisDate And _
VennDrivers(counter).Job(counter3).PickUpTime = thisTime Then
'This is a conflicting pickup add the pickup id to the menu
If counter4 > 0 Then
Load frmMain.mnuSelectedPickup(counter4)
End If
frmMain.mnuSelectedPickup(counter4).Caption = VennDrivers(counter).Job(counter3).PickupID
counter4 = counter4 + 1
End If
Next
PopupMenu mnuChoosePickup
Else
PopupMenu mnuAllocate
End If
======================================
They say, best men are moulded out of faults,
And, for the most, become much more the better
For being a little bad.
======================================