Re: how do i get string into.........
From: Peter van der Goes (p_vandergoes_at_toadstool.u)
Date: 08/19/04
- Next message: Cor Ligthert: "Re: DataRow - How To?"
- Previous message: Adam Maltby: "Re: Need transparent label but with a slight difference"
- In reply to: Supra: "how do i get string into........."
- Next in thread: Supra: "Re: how do i get string into........."
- Reply: Supra: "Re: how do i get string into........."
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 19 Aug 2004 07:28:44 -0500
"Supra" <supra56@rogers.com> wrote in message
news:mR0Vc.1809004$Ar.1637085@twister01.bloor.is.net.cable.rogers.com...
> how do i get string into combobox? i am working on irc chat similar to
> mirc.
>
> i put in declaration section:
>
> Dim szCommand() As String = {"ACTION", "JOIN", "PART", "QUIT",
> "NOTICE", "KICK", "BAN", "INVITE", "TOPIC", "MODE", "AWAY", "CHAT",
> "OTHER", "USER"}
>
> and in sub new()
>
> For iCommand As Integer = 0 To szCommand.Length
> cboCommand.Items.Add(iCommand) ===> display 0 to 14
> instead of string
> Next
> end sub
>
> regards
>
Use the integer as the subscript into your array of strings.
(warning. code is untested)
For i as Integer = 0 To szCommand.Length - 1
cboCommandItems.Add(szCommand(i))
Next
Note the differences. First the loop control restricts the repetitions to 14
(0 - 13) to match the number of strings in your array. Second, strings are
added to the combo box.
Hope this helps.
-- Peter [MVP Visual Developer] Jack of all trades, master of none.
- Next message: Cor Ligthert: "Re: DataRow - How To?"
- Previous message: Adam Maltby: "Re: Need transparent label but with a slight difference"
- In reply to: Supra: "how do i get string into........."
- Next in thread: Supra: "Re: how do i get string into........."
- Reply: Supra: "Re: how do i get string into........."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|