GUI Spinbox Data Index
Joel Boyer
Posts: 3
Hello, I'm using GUIbase.spin for some screens and i am using the spinbox object.· I have the data in the spinbox and scrolling through the data is no problem.· The problem comes when i try to get the data index of the data currently being displayed by the box.· I just get a 0.· Here is my code.· Hopefully you can help.· Thanks in advance.
This is the code i used to register the object.
This is my DAT section
[color=red]gx := GUI.SpinGetDataIndex(ConfigSpin) GUI.PrintStr( 20, 3, NUMS.decf( gx, 2 ), 0) case gx 0 : GUI.PrintStr( 10, 3, string("10"), 0) 1 : GUI.PrintStr( 10, 3, string("40"), 0) 2 : GUI.PrintStr( 10, 3, string("60"), 0) 3 : GUI.PrintStr( 10, 3, string("00"), 0)[/color]
This is the code i used to register the object.
[color=red]ConfigSpin := GUI.SPINInit( 6, 1, 16, 0, 24, @SpinDat0 )[/color]
This is my DAT section
[color=red]byte "Channel 1",0 byte "Channel 2",0 byte "Channel 3",0 byte "Channel 4",0 byte "Channel 5",0 byte "Channel 6",0 byte "Channel 7",0 byte "Channel 8",0 byte "Channel 9",0 byte "Channel 10",0 byte "Channel 11",0 byte "Channel 12",0 byte "Channel 13",0 byte "Channel 14",0 byte "Channel 15",0 byte "Channel 16",0 byte "Channel 17",0 byte "Channel 18",0 byte "Channel 19",0 byte "Channel 20",0 byte "Channel 21",0 byte "Channel 22",0 byte "Channel 23",0 byte "Channel 24",0[/color]