Sign in to follow this  
Followers 0
MichaelO

Create a listbox with values that include the pipe

2 posts in this topic

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!

Share this post


Link to post
Share on other sites



See GUIDataSeparatorChar in helpfile


"be smart, drink your wine"

Share this post


Link to post
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
Sign in to follow this  
Followers 0