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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Dropdown list

whaley
1-Visitor

Dropdown list

Hi,

I have a dropdown list in Mathcad. I have sections in it and it calls in some of the required section properties under it.

Unfortunately whenever I close and reopen the file, the list jumps back to the very first item and forgets what I had chosen before.

I have tried to protect the area but didn't help.

Could anyone tell me how can I fix it to remember my choice?

Thanks in advance,

Viktoria

7 REPLIES 7
Werner_E
25-Diamond I
(To:whaley)

Unless you use web controls you may finde a solution here: Saving the state of controls.zip

whaley
1-Visitor
(To:Werner_E)

Thank you!

JeffH1
16-Pearl
(To:whaley)

I submitted this example to the old Mathcad Collaboratory a long time ago and it was featured in a Mathcad Express article.  I can't find the old article on-line any more, but here is the Mathcad file, updated for Mathcad 15, demonstrating how to create persistent controls using the metadata in the file.  I use this technique quite frequently for files that need to maintain their control states.

whaley
1-Visitor
(To:JeffH1)

Thank you!

VladimirN
24-Ruby II
(To:JeffH1)

Thank you, Jeff.

whaley
1-Visitor
(To:JeffH1)

Hi Jeff,

I have tried to type into the script according to your guidance but got some error messages and gave up after all.

Anyway what I did at the end, just picked what I need from the listbox, found which element was it, then wrote this number back into the script  to the "If OnLoad Then

  ListBox.CurSel = " section.

Maybe later I will try again to set up your method, it is much sophisticated than mine

Thank you anyway!

Viktoria

Hi William,

Looks like Werner's and Jeff's answers may have helped you - excellent.

If one of those did solve your issue, would you please mark it as correct?  This will make the knowledge / solution easier to find.

Thanks for participating within PTC Community.

Best,

Toby

Announcements

Top Tags