Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Installation / Documentation > SdAskOptionsList() without defaults to force a selection [InstallShield Pro 6.31]

Thread Tools Display Modes
Old 10-23-2006, 01:24 PM
Shaitan00 Shaitan00 is offline
Junior Contributor
Join Date: Apr 2003
Posts: 253
Question SdAskOptionsList() without defaults to force a selection [InstallShield Pro 6.31]

Simply put I want to display an OptionList (using SdAskOptionList) without any defaults to force the user to select one before he can press NEXT.
The idea is to provide a list of options to the user but have the NEXT button disabled until at least ONE of the options are selected - which in turn means that when we first display the list none of the options should be selected...

for nCurrent = 0 to nSize
	// ... do some work to get sValue corresponding to this nCurrent ...
	ComponentAddItem("CustomSetNameList", sValue, nCurrent, FALSE);
sTmp = MEDIA;
MEDIA = "CustomSetNameList";
nRetVal = SdAskOptionsList("Step 5 - Identification", "Please select the"+
			" proper name.", "", EXCLUSIVE); 
MEDIA = sTmp;
Root problem is - during install sometimes people just click next,next,next,etc... but at this stage I want to FORCE the user to select something from the list.
Therefore I need to ensure there is NO default and I need to ensure that the NEXT button is disabled until one of the options are selected...

I can't seem to figure out what is wrong with my above-code, I did some reading and I thought that setting "ComponentAddItem("CustomSetNameList", sValue, nCurrent, FALSE);" when adding the value to the Component would solve the DEFAULT problem (as bSelected is FALSE for all items) but this doesn't seem to work, when I run it the 1st option on the list is always checked...

Any help would be greatly appreciated...
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..