Skip to main content
10-Marble
October 10, 2025
Solved

Is it possible to automatically populate a "Basic combo box"?

  • October 10, 2025
  • 1 reply
  • 715 views

Hello 

Assuming you have a matrix defined, is it at all possible to use (part of) this matrix to create the choices available in a "Basic combo box"?

More explanation:
I use READEXCEL to read a table from an Excel file, and get a matrix with column headers in the first row, and some other identifier in the first column. Can I put this matrix into a combo box, so that the user can select the relevant row for further calculations?

Regards
Hallvard

Best answer by Werner_E

Moving the loop which creates the option strings from ListBoxEvent_Exec to ListBoxEvent_Start does the job.

Not sure if this change in behaviour from Prime 10 to Prime 11 should be considered a bug or if there is some reason for the change.
Any ideas?

 

1 reply

25-Diamond I
October 10, 2025

I assume that you are talking about Prime, not older real Mathcad, aren't you?

 

Only way I am aware of to get larger data already present in a basic combo box is to edit the Prime worksheet (which is a zipped collection of xml files).

 

What you want to do achieve can be done with an Advanced List Box where you can use your Prime matrix as input.

Examples of how to do this were posted here in the forum from time to time.

For example:

Solved: Re: Mathcad prime 10. Advanced Controls. List. Wri... - PTC Community

and as an example of use:

Solved: Re: How to plot Barnsley fern fractal? - PTC Community

10-Marble
October 13, 2025

Hello @Werner_E 

As usual thank you for a quick reply.  😀
Yes, I am talking about Prime, version 11.0.0.0 to be exact.

It was actually quite simple to get one step further based on your simple example. 👍

However, unlike in the screenshot the selection does not appear to influence the return value.

 

HP_1364456_1-1760356187990.png

 

Also the control is "greyed out". My own worksheet also behaves this way.
(Actually tried copying it into a new worksheet, where it is not grayed out, but still the selection doesn't affect the result.)

The (much more) complicated fractal example, however, works just fine! (Usually it is the other way around, simple works, advanced doesn't.) 

Have to figure out what the difference is..

Regards
Hallvard

 

 

24-Ruby III
October 13, 2025

@HP_1364456 wrote:

Hello @Werner_E 

As usual thank you for a quick reply.  😀
Yes, I am talking about Prime, version 11.0.0.0 to be exact.

It was actually quite simple to get one step further based on your simple example. 👍

However, unlike in the screenshot the selection does not appear to influence the return value.

 

HP_1364456_1-1760356187990.png

 

Also the control is "greyed out". My own worksheet also behaves this way.
(Actually tried copying it into a new worksheet, where it is not grayed out, but still the selection doesn't affect the result.)

The (much more) complicated fractal example, however, works just fine! (Usually it is the other way around, simple works, advanced doesn't.) 

Have to figure out what the difference is..

Regards
Hallvard

 

 


Hi,

please upload your mcdx file.