Page 1 of 1

Addbuttons

Posted: Mon Apr 04, 2016 6:03 am
by omni
Roger,

We use addbuttons on any program without additional buttons, just needing an ok/cancel or similar. On some we also use @say sayobject to let user know what is happening on multi-part processing, like 1 of 1000 records, things like that. Some users for whatever reason go back and start clicking the buttons again. Know how to handle that with pushbuttons by adding a WHEN or similar to stop them from causing an array index error.
Can that be done with addbuttons? We can change these to pushbutttons, but wondered if the other method is available.

Thanks

Fred
Omni

Re: Addbuttons

Posted: Mon Apr 04, 2016 6:15 am
by Tom
Hi, Fred.

Look at the DCGETOPTIONS BUTTONS <aButtons> clause. This accepts an array as the parameter (two-dim). At position 8 you can add a WHEN-codeblock for each button.

Re: Addbuttons

Posted: Mon Apr 04, 2016 6:15 am
by rdonnay
You need to use the BUTTONS <aButtons> clause of DCGETOPTIONS.

aButtons allows for a WHEN code block.