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]


Reply
 
Thread Tools Display Modes
  #1  
Old 10-23-2006, 02: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...

Code:
for nCurrent = 0 to nSize
	// ... do some work to get sValue corresponding to this nCurrent ...
	ComponentAddItem("CustomSetNameList", sValue, nCurrent, FALSE);
endfor;
	
	
Disable(BACKBUTTON);
Disable(NEXTBUTTON);
sTmp = MEDIA;
	
Disable(DIALOGCACHE);
MEDIA = "CustomSetNameList";
nRetVal = SdAskOptionsList("Step 5 - Identification", "Please select the"+
			" proper name.", "", EXCLUSIVE); 
MEDIA = sTmp;
Enable(DIALOGCACHE);
Enable(NEXTBUTTON);
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...
Thanks,
Reply With Quote
Reply


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

Advertisement:





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.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
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..
subscribe
 
 
-->