02-23-2020 04:07 PM
Hello,
I need help for boolen manupulation.
I want to create a QHM State Machine for user event via checkbox (or any control boolean)
The main purpose is that user can select just one in five checkboxes and QMH call selected boxes loop.
If user select more than one checkbox the older selections will be empty and if user not select a box the QMH send an information message to user.
Thank you.
02-23-2020 04:31 PM
Use Radio Buttons.
mcduff
02-23-2020 08:44 PM
Hello mcduff,
Thank you for your reply.
I must use checkbox.
Also checkboxs will group in a tab's pages next step.
Checkbox1&2 in page-1
Checbox3 in page-2
Checkbox4&5 in page 3
etc.
02-26-2020 09:02 AM - edited 02-26-2020 09:03 AM
You already have an Event Structure that handles the boolean controls you're interested in.
You can use the Control Ref (from the left of the Event Structure) and something like the Label value to determine which was clicked, and then pass that information to your message handler. See this page for an example using Caption text to identify controls.
You'll also need to handle the other checkboxes (e.g. if 1 is selected, and you click 2, you want to set 1 to false perhaps). You could do this with an array of control references or similar.
Tabs won't cause a problem with that setup (although I recognise they will interfere with radio buttons, or else that would indeed be both the obvious and better solution).
I will point out that having selections on one tab affect selections on a then invisible tab might be a bit confusing for users though... and if you remove this behaviour (by making them all visible at once outside of the tab control, or by having smaller exclusive groups) you could go back to the Radio Button idea.