DEVCHAN for Pop-Ups Question
staticattic
Posts: 200
When I do pop-ups, I usually create a DEVCHAN. Something like:
To utilize them, I usually do this:
This has always worked fine in the past. However, today I found a limitation in using this. I have three popups and six buttons controlling them. Bascially, I am using left and right buttons on each popup. Popup one shows inputs 1 - 10, popup two shows inputs 11 - 20, and popup three shows inputs 21 - 30. The idea I had was to use right and left arrow keys at the bottom of each popup to "scroll" to the next set of numbers either up or down. Short of hard coding each button, what would be the "proper" way to do this?
CHAR cPopUpNames[][20] = { 'PopUp 1', 'PopUp 2', 'PopUp 3' } DEVCHAN dvMYPOPUPS[] = { {dvTP,1}, {dvTP,2}, {dvTP,3} }
To utilize them, I usually do this:
BUTTON_EVENT[dcMYPOPUPS] { PUSH: { nButtonNumber = GET_LAST(dcMYPOPUPS) SEND_COMMAND dvTP,"'@PPN-',cPopUpNames[nButtonNumber]" } }
This has always worked fine in the past. However, today I found a limitation in using this. I have three popups and six buttons controlling them. Bascially, I am using left and right buttons on each popup. Popup one shows inputs 1 - 10, popup two shows inputs 11 - 20, and popup three shows inputs 21 - 30. The idea I had was to use right and left arrow keys at the bottom of each popup to "scroll" to the next set of numbers either up or down. Short of hard coding each button, what would be the "proper" way to do this?
0
Comments
SEND_COMMAND dvTP, "'@PPN-', cPopUps[nNum]
Maybe not the best way to do this, but it works for now.