Saving information in an array of objects

Valerie

Member
Joined
Feb 27, 2005
Messages
7
Programming Experience
Beginner
I have to get a current house's address and display it in a textbox named txtAddress. Here is some of the code. I guess I should say that it is from a scroll bar that when you slide it forward or back it shows which address goes with the number on the scroll bar. The houses are in a list box. I hope I'm not confusing anyone. I'm confused myself. I have been working on this and searching but I am at a loss right at the moment. Maybe I have been working on it too long. 'Get the current house's address and display in txtAddress



PrivateSub UpdateHome()

Dim pintCurrent AsInteger

pintCurrent = hsbHouses.Value

lblHouses.Text = pintCurrent.ToString()

SelectCase marrHouses(pintCurrent).GarageCount

Case 2

radTwoCar.Checked =
True

Case 3

radThreeCar.Checked =
True

EndSelect

SelectCase marrHouses(pintCurrent).Rooms

Case HousePackage.HouseConfig.FourRooms

rad4Rooms.Checked =
True

Case HousePackage.HouseConfig.ThreeRoomsDen

rad3RoomsDen.Checked =
True

Case HousePackage.HouseConfig.TwoRoomsDenMaster

rad2RoomsDenMS.Checked =
True

EndSelect

'Get the current house's address and display in txtAddress

IfTypeOf marrHouses(pintCurrent) Is HousePackage.Barcelona Then

cbxModelType.SelectedIndex = 0

ElseIfTypeOf marrHouses(pintCurrent) Is HousePackage.Madrid Then

cbxModelType.SelectedIndex = 1

Else

cbxModelType.SelectedIndex = 2

EndIf

 
Top Bottom