Jump to content

Create a listbox with values that include the pipe


MichaelO
 Share

Recommended Posts

I'm trying to create two listboxes using GUICtrlCreateList - one that gets populated based on the selection of the other.

$var = IniReadSection($myCustomersINI, GUICtrlRead($SelectList))
                $myKeys=""
                If @error Then 
                    MsgBox(4096, "", "Error occurred, probably no INI file.")
                Else
                    For $i = 1 To $var[0][0]
                        $myKeys=$myKeys & "'" & $var[$i][0] & $var[$i][1] & "'" & "|"
                    Next
                EndIf
                $SelectKeyList = GUICtrlCreateList("", 200, 40, 150, 150, -1, 0)
                GUICtrlSetData(-1,$myKeys)

My issue is that the values contain pipes ("|"), but pipes are the delimiters used to populate the listboxes.

So instead of getting:

TCPIP|192.168.1.207|8000

TCPIP|192.168.1.207|6000

TCPIP|MARGE|6000

as list values, I get:

TCPIP

192.168.1.207

8000

TCPIP

192.168.1.207

6000

TCPIP

MARGE

6000

as if each subsection is its own value.

Does anyone know how I can get a pipe to appear in a listbox?

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...