ListBoxes are those same drop down components that you see in HTML forms. The same control called ComboBox works the same way although the appearance would be that of a 1 liner drop down box. Anyway, adding items to a ListBox object is pretty easy. Just do

But the code above will only add the labels that will apear within the ListBox. What if you want to have a ListBox that acts the same as a drop down HTML form component with a name and value attribute. You can create your own custom class with Name and Value exposed, place them inside an ArrayList object and pass it on to the ListBox’s DataSource property.

You can then get the selected name (and/or value) of the ListBox by doing this

Do you know what mnemonics are? Those are short underlines below an alphabet character usually found on labels. Usually when you press the key ALT together with the said letter, if the mnemonic is inside a button, the button gets pushed, the same result as when you click on that same button using a mouse. To activate this, we use the character & (ampersand) beside the letter. Simple as that. In Visual Studio, just go to the control’s properties and look for the Text property.

But what if we set a mnemonic to a Label so that when the key combination is activated, the focus goes to a TextBox. You do the same thing you do with the button’s label. Add an & character beside the letter. To link the Label and the TextBox, the TabIndex of the Label must be - 1 (minus 1) than the TabIndex of the TextBox. This is how it works in Visual Studio unlike Java where you use a method to set the component that the Label‘s mnemonic will focus on. You can find TabIndex part within the properties of the Control.

It has been quite some time since I did a review on an iTouch game. It is because there was really no new game that had me interested to get hooked on. Yesterday, after I installed The Creeps, I practically enjoyed it. It is a tower-defense kind of game from Super Squawk Software, the same type as another iTouch game called Field Runners. The game does come with defined maps unlike Field Runners wherein you are dependent on just 2 maps (currently) and when I finished the game, I did not have any urge to play it again. Your enemies come out from the closet going to your bed and it is your goal to stop them before they reach it. If any of them reaches your bed, your life decreases until there is no more life left and the game ends. There are 16 different levels that you do not have access to all of them unless you finish the first few levels. Build and upgrade towers to destroy them and as more levels are unlocked, more weaponry is available to you like toy blasters, glue bottles, flashlights and boomerangs. Summon a giant spider to slow them down, or a UFO to sap thier energy! Place the path with some oil to make the Creeps slide fast down hill and climb slowly up hill. Use a tornado to carry the Creeps along the path in any direction! Your goal is to destroy all of them until there are no more waves of enemies left. You can also destroy other neutral objects like rocks and trees to increase your money so you will be able to upgrade your weapons. The price for this game is definitely worth it. Loads of fun and non-stop gameplay, I definitely got addicted with it, always wanting to finish the current level so I could get on to the next level.

Related Posts Plugin for WordPress, Blogger...