cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Disable controls by programming in Mathcad

yogeshdeshpande
1-Newbie

Disable controls by programming in Mathcad

I am working on Mathcad worksheet to do calculations based on user inputs. For user friendly inputs, I want to programatially disable or hide a listbox control based on user selection. Can we do this in mathcad?

15 REPLIES 15

Sorry, but there is no way to do that.

You can't disable the listbox, but you can dynamically change the values which can be chosen to just on default.

We had a similar question about listboxes a short time ago. See attached sheet.

Along with the listbox, I also want to disable one input textbox based on user input. If I can not disable it, it causes addtional input and unnecessary confusion for user.

You may consider to replace that textbox input by a popup user prompt (as shown in Richards rich collection) which is triggered or not by the script depending on that user input.

various scripting options are possible with buttons, radio buttons & text boxes, see example attached.

without knowing what is needed its difficult to know if these can be adapted to suit.

hope it gives you a few ideas for what can be achieved.

regards

Andy

Looks quite useful. Unfortunately there is no property "Enable" for listboxes, otherwise this would have been the answer in the first place (as the question initally was for disabling listboxes).

RichardJ
19-Tanzanite
(To:Werner_E)

What is possible with the listbox is to clear it's content, so that there is nothing to select. Basically one step beyong what you show above.

True, but it is still possible to control the listbox by similar means.

I didn't have an example at the time but here goes (try toggling between Horiz & Vert).

I see - think thats what Richard suggested. I guess this should do the job as demanded by Yogesh.

Thank you for replay, trying to understand how its done and working on implementing it in my worksheet.

How to keep default state as disabled for the listbox control through script when Mathcad is opened ? I think the code we discussed here is applicable once list box is executed. Shpuld there be some code in start event?

See the new listbox in the attached.worksheet.

Ignore the start and stop events. They have been obsolete for years.

thank you, its working fine now in my spreadsheet as well

I am trying to update excel file value based on user input. I want to have push button (to modify value) disabled when I open Mathcad worksheet and it should be enabled based on user selection. What is happening here is when I save worksheet with value to disable it as true, when I open next time, I get push button disabled. But when I save it as disabled, it opens next time as enabled. In both the cases the value to disable the button remains true. May be this has some thing to do with residual value in memory, not sure. Can you please help? Attached is Mathcad file for reference.

Hi ,

Does this do what you want?

Seems to be that Mathcad needs the default 'enable' state set to true at start up...4

regards

Andy

Top Tags