How to retrieve User Input from a Combo Box

Started by EricStiles, June 07, 2010, 11:31:47 AM

Previous topic - Next topic

EricStiles

I'm new to OpenDCL, and attempting my first program.  So sorry if these are stupid questions.  I have two questions but deal with the same concept.

1) If the user doesn't like what he sees in the drop down list I want him/her to be able to type what he/she needs.  The combo box with a style set to "0 - Combo" does do that exactly.  But How do I get what the user typed?  

When I use the statement:    (setq Var (dcl_Control_GetText File_Form_Var))
Var is equal to the first option on the drop down list and not what the user typed.

2) Also, how do I then send what the user typed back to that same combo box if the user should run the program again.  Do I need to add it to the list?   I would rather not add it to the list but just have it as the default if they ran the program again, basically saving there settings but not changing the default pull down list.

EricStiles

I figured it out.  To get what the user typed from the Combo box, use the following funtion:
(dcl_ComboBox_GetEBText File_Form_Var)

To set it:
(dcl_Control_SetText File_Form_Var Var)

;D