I would use a while loop with a shift register (initialized as a string). Inside that a case statement to build a state machine (shift register connected to selector in case). I use a VI that returns the name of which button was pressed on the panel. Using this, I can choose what the button does based on what "state" the program is in (in the case statement). Some buttons will just choose what the next state is (by feeding the name out to the shift register), and some buttons can perform actions.
I hope that that is not too confusing. I built a real quick and dirty example. All it does is change from state to state, but the buttons could do something if you wanted. Just run the "Soft Buttons" Vi from the library.
Rob