12
« on: May 19, 2013, 05:56:41 AM »
I've read heaps of posts regarding the use of a dialog box, but I can't for the life of me figure out the format for the following sequence to work:
1 Dialog box opens with multiple tools in the list (This works ok)
2 Select the item you want (This works ok)
3 Depending on the item selected, values are entered into custom DRO's (No idea how to complete this part)
This is the test code I am using (just from the manual):
Sub Main
Dim MyList$ (5)
MyList (0) = "line Item 1"
MyList (1) = "line Item 2"
MyList (2) = "line Item 3"
MyList (3) = "line Item 4"
MyList (4) = "line Item 5"
MyList (5) = "line Item 6"
Begin Dialog BoxSample 16,35,256,89,"Drop-Down List Box"
OKButton 204,24,40,14
CancelButton 204,44,40,14
DropListBox 124,24,72,40, MyList$( ),.DrpList
Text 124,12,68,8,"Drop-Down List Box:"
End Dialog
Dim Dlg1 As BoxSample
Button = Dialog ( Dlg1 )
End Sub
So ideally if "line Item 1" is selected it will enter the following data:
SetOEMDRO(1204,4)
SetOEMDRO(1205,4.15)
SetUserLED(1007,1)
SetUserLED(1008,1)
'Message "Line Item 1 Details Entered"
If "line Item 2" is selected it will enter the following data:
SetOEMDRO(1204,10)
SetOEMDRO(1205,5.25)
SetUserLED(1007,1)
SetUserLED(1008,1)
'Message "Line Item 2 Details Entered"
So on and so forth.
I've done a bit with the visual basic side of it, but really only the basics of onscreen buttons and leds.
Thanks
Darc