Combo Box in Primal forms


Does anyone know how to, or have any good links to somewhere explaining how to use the Combo Box in Primal forms?

I’m looking to add a few pre-defined entries available from the drop down, and when these are selected it loads a variable.

I’ve read the article below, but I can’t really make any sense of it.


Well, $box.Items.Add(‘whatever’) is how you’d add an item. Is there some other specific part of this that you need help with?

Hi Don,

What I’m trying to figure out is, once the choice is made, for example, you have set the box to ‘ComputerA’, how do you take that value and use it somewhere else?


So, there’s an event you have to attach code to if you want to do something when someone changes the value of the control. Usually, you don’t do that - you just let them dicker around until they hit an OK button, and then you read the values.

To read the value, it’s just $box.SelectedItem.

You also have to distinguish between a ComboBox (a list of values, but the user can type their own) or a simple DropDownList (just a list of values, must pick one). You set a property of the combo box to tell it how to behave. You can do that in the designer.

SAPIEN also runs a great set of forums to help people with GUI issues - drop by there if you need specifics. I don’t use the product every day, so I don’t have all the answers off the top of my head.

Thank you, Don. This has helped, something has clicked! :slight_smile:

Cheers man