PDA

View Full Version : How could I capture the value from a ComboBox to use it later on in the script?



shkoda911
03-04-2005, 10:51 AM
How could I capture the value from a ComboBox to use it later on in the script?
In SdSQLServerSelectLoginDlg I need to keep the name of the SQL Server I browsed to. Tried to use:

if (CtrlGetCurSel ("SQLServerSelectLoginDlg", 10109, svSQL)<0 )
then MessageBox("Unable to retrieve the selected item",INFORMATION);
else MessageBox("("SQL Server installed: " + svSQL,INFORMATION);
endif;

but the message is always "Unable to retrieve the selected item".


COuld it be that CtrlGetCurSel can only be used with the Custom dialog boxes and not with the Standard ones?

thanks.

RadhaK
03-07-2005, 02:32 AM
Hi,

Check the below Installshield Helpnet article

http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield10-5langref/LangrefCtrlGetCurSel.htm

shkoda911
03-07-2005, 09:31 AM
Thanks, RadhaK.

In the example from the original message I do use this command but it does not produce any result.

if (CtrlGetCurSel ("SQLServerSelectLoginDlg", 10109, svSQL)<0 )


"SQLServerSelectLoginDlg"- is the name of Standard (not Custom) dialog (I also tried to use its "internal" name, like "ControlId_10109" or "DialogId_10109"),

10109- its ID (I also tried the ComboBoxId 17815)

RadhaK
03-08-2005, 03:29 AM
Hi,

I believe, CtrlGetCurSel is the Custom Dialog function, which cannot be used in Built-in-dialog.

The CtrlGetCurSel function retrieves the currently selected item from a single-selection list box or combo box control in a custom dialog box. Call CtrlGetMultCurSel to retrieve items from multi-selection list boxes.

Check the below Installshield Helpnet article link to know more about CtrlGetCurSel

http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield10-5langref/LangrefCtrlGetCurSel.htm

To know more about custom Dialog functions, check the below Installshield helpnet article

http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/installshield10-5langref/LangrefCustom_dialog_box_functions.htm

To know more about Built-in Dialog functions, check the below Installshield helpnet article

http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/InstallShieldXLangRef/LangrefBuiltin_dialog_box_functions.htm