CHAPTER 7 (Best web design) ITERATIVE PROCESSING Note The ComboBox
CHAPTER 7 ITERATIVE PROCESSING Note The ComboBox control is a space-saving control that, when clicked, displays a list of String values from which the user can make a selection. From the REALbasic IDE, you can add items to a ListBox by assigning data to its InitialValue property. Like the ListBox control, REALbasic also lets you programmatically add items to a ListBox control the AddRow method. In this example, if the value assigned to intCounterhad been set to 11 or greater at the start, the loop would have been skipped. This behavior occurs because the tested condition is checked at the beginning of the loop. The second way to use the Until keyword when setting up a Do Loop is to move the Boolean expression to the end of the loop. The following shows the syntax for this form of the Do…Loop. Do Statements Loop Until condition The result of moving the tested condition to the end of the loop is this: the Do Loop executes once, no matter what the value of intCounter might be. Otherwise, this form of the Do Loop works pretty much the same as the first form, as the following example shows. Dim intCounter As Integer = 1 Do PopupMenu1.AddRow Str(intCounter) intCounter = intCounter + 1 Loop Until intCounter > 10 In this example, the Do Loop runs one time no matter what. However, because the initial value assigned to intCounter is one, it runs ten times, producing the same output as the previous example. Figure 7-3 shows the output produced when this example is executed on a computer running Mac OS X. Note You might have noticed in the last example that, instead of populating data to a ComboBox control, the data was added to a PopupMenu control. The two controls operate in a similar fashion. The main difference is that, in addition to enabling the user to select from a list of items, the ComboBox also provides the capability to accept input keyed in by the user.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.