View previous topic :: View next topic |
Author |
Message |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Wed Nov 05, 2014 4:26 am Post subject: Action bars |
|
|
My first experiment at creating/designing a panel with action bar choices.
I have created a panel, but what I can't seem to find anywhere is how to disable (programmatically) an action bar option.
Let's assume I have a menu option with 3 choices.
Depending on what the user selects (somewhere on the panel), I might want to disable options 2 & 3.
Another choice might result in options 1 & 3 being disabled and option 2 now being enabled.
Is this something I can do via my panel/via a call to Rexx or do I have to program/define it in a DTL for the panel. _________________ Michael |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Wed Nov 05, 2014 4:30 am Post subject: |
|
|
Forgot to give an example above. On our system, if I enter 3.4, one of the action bar options is RefMode.
If I select this, I see that one of the options (List execute/List retrieve) is enabled, the other disabled. If I select the (one) option I can, the enabled/disabled are reversed _________________ Michael |
|
Back to top |
|
 |
misi01 Advanced
Joined: 02 Dec 2002 Posts: 629 Topics: 176 Location: Stockholm, Sweden
|
Posted: Wed Nov 05, 2014 9:43 am Post subject: Found the answer (in the end) |
|
|
You need something like this in your panel definition (basically, it's the UNAVAIL parm connected to a variable and the setting of the variable to 0/1 that does the trick)
Code: |
)ABC desc(Menu)
PDC DESC('Save') UNAVAIL(Save) ACTION RUN(SAVE)
PDC DESC('End') UNAVAIL(End) ACTION RUN(END)
PDC DESC('Cancel') ACTION RUN(CANCEL)
PDC DESC('Select') ACTION RUN(CANCEL)
)ABCINIT
.zvars = 'MENUX'
&menux = 3 /* By setting it to 3, we make option 3 the default */
&save = 0 /* Set to 1 to make the Save option unavailable */
&end = 0 /* Set to 1 to make the End option unavailable */
|
_________________ Michael |
|
Back to top |
|
 |
|
|