I have the need to disable listbox entries that start with '\\', such as a
network path. Normally, you start the entry with '\', and it will be
disabled. If you have a legitimate backslash, you would change it two
backslashes so that it is enabled and displays a single backslash. BUT - if
you have two or more backslashes, it will just display backslashes and not
disable the entry. How would you get \\SomePath to appear as disabled? I can
put a space between a backslash and the rest of the item, but then I have a
disabled entry with a leading space.

Re: How to disable listbox entry by Edhy

Edhy
Wed Sep 15 14:26:11 CDT 2004

Hi Ook,

I tested this from the INIT() of a ListBox in VFP8

lcServerPath = "\\\server\Application Share Folder"
this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"

--
Edhy

"Ook" <usenet@nospam.emberts.com> wrote in message
news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
>I have the need to disable listbox entries that start with '\\', such as a
> network path. Normally, you start the entry with '\', and it will be
> disabled. If you have a legitimate backslash, you would change it two
> backslashes so that it is enabled and displays a single backslash. BUT -
> if
> you have two or more backslashes, it will just display backslashes and not
> disable the entry. How would you get \\SomePath to appear as disabled? I
> can
> put a space between a backslash and the rest of the item, but then I have
> a
> disabled entry with a leading space.
>
>



Re: How to disable listbox entry by Edhy

Edhy
Wed Sep 15 14:32:38 CDT 2004

Ook,

After re-reading your post, I noticed you don't want the space, so when to
the VFP8 help and the solutions is pretty simple:

lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"

** This is from the VFP8 Help file **
If the expression begins with multiple backslashes, the item is not
disabled. If you want to disable an item that begins with multiple
backslashes, add a backslash and a close bracket (]) to the beginning of the
item. For example, the following would disable the UNC path item in the list
box:
MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
--
Edhy Rijo
Programming System Solutions www.progytech.com
Bronx NY


"Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
> Hi Ook,
>
> I tested this from the INIT() of a ListBox in VFP8
>
> lcServerPath = "\\\server\Application Share Folder"
> this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
>
> --
> Edhy
>
> "Ook" <usenet@nospam.emberts.com> wrote in message
> news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
>>I have the need to disable listbox entries that start with '\\', such as a
>> network path. Normally, you start the entry with '\', and it will be
>> disabled. If you have a legitimate backslash, you would change it two
>> backslashes so that it is enabled and displays a single backslash. BUT -
>> if
>> you have two or more backslashes, it will just display backslashes and
>> not
>> disable the entry. How would you get \\SomePath to appear as disabled? I
>> can
>> put a space between a backslash and the rest of the item, but then I have
>> a
>> disabled entry with a leading space.
>>
>>
>
>



Re: How to disable listbox entry by Ook

Ook
Wed Sep 15 15:00:48 CDT 2004

Where in the help file did you find this?

"Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
news:ecMpCr1mEHA.3712@TK2MSFTNGP15.phx.gbl...
> Ook,
>
> After re-reading your post, I noticed you don't want the space, so when to
> the VFP8 help and the solutions is pretty simple:
>
> lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
> this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"
>
> ** This is from the VFP8 Help file **
> If the expression begins with multiple backslashes, the item is not
> disabled. If you want to disable an item that begins with multiple
> backslashes, add a backslash and a close bracket (]) to the beginning of
the
> item. For example, the following would disable the UNC path item in the
list
> box:
> MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
> --
> Edhy Rijo
> Programming System Solutions www.progytech.com
> Bronx NY
>
>
> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
> > Hi Ook,
> >
> > I tested this from the INIT() of a ListBox in VFP8
> >
> > lcServerPath = "\\\server\Application Share Folder"
> > this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
> >
> > --
> > Edhy
> >
> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
> >>I have the need to disable listbox entries that start with '\\', such as
a
> >> network path. Normally, you start the entry with '\', and it will be
> >> disabled. If you have a legitimate backslash, you would change it two
> >> backslashes so that it is enabled and displays a single backslash.
BUT -
> >> if
> >> you have two or more backslashes, it will just display backslashes and
> >> not
> >> disable the entry. How would you get \\SomePath to appear as disabled?
I
> >> can
> >> put a space between a backslash and the rest of the item, but then I
have
> >> a
> >> disabled entry with a leading space.
> >>
> >>
> >
> >
>
>



Re: How to disable listbox entry by Edhy

Edhy
Wed Sep 15 16:15:42 CDT 2004

When I need help on something specific, I right click the control or
property and choose help!

--
Edhy Rijo
Programming System Solutions www.progytech.com
Bronx NY


"Ook" <usenet@nospam.emberts.com> wrote in message
news:OWWny61mEHA.1800@TK2MSFTNGP15.phx.gbl...
> Where in the help file did you find this?
>
> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> news:ecMpCr1mEHA.3712@TK2MSFTNGP15.phx.gbl...
>> Ook,
>>
>> After re-reading your post, I noticed you don't want the space, so when
>> to
>> the VFP8 help and the solutions is pretty simple:
>>
>> lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
>> this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"
>>
>> ** This is from the VFP8 Help file **
>> If the expression begins with multiple backslashes, the item is not
>> disabled. If you want to disable an item that begins with multiple
>> backslashes, add a backslash and a close bracket (]) to the beginning of
> the
>> item. For example, the following would disable the UNC path item in the
> list
>> box:
>> MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
>> --
>> Edhy Rijo
>> Programming System Solutions www.progytech.com
>> Bronx NY
>>
>>
>> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
>> news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
>> > Hi Ook,
>> >
>> > I tested this from the INIT() of a ListBox in VFP8
>> >
>> > lcServerPath = "\\\server\Application Share Folder"
>> > this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
>> >
>> > --
>> > Edhy
>> >
>> > "Ook" <usenet@nospam.emberts.com> wrote in message
>> > news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
>> >>I have the need to disable listbox entries that start with '\\', such
>> >>as
> a
>> >> network path. Normally, you start the entry with '\', and it will be
>> >> disabled. If you have a legitimate backslash, you would change it two
>> >> backslashes so that it is enabled and displays a single backslash.
> BUT -
>> >> if
>> >> you have two or more backslashes, it will just display backslashes and
>> >> not
>> >> disable the entry. How would you get \\SomePath to appear as disabled?
> I
>> >> can
>> >> put a space between a backslash and the rest of the item, but then I
> have
>> >> a
>> >> disabled entry with a leading space.
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Re: How to disable listbox entry by Ook

Ook
Wed Sep 15 16:17:30 CDT 2004

The plot thickens. If your rowsourcetype is an array, it does not evaluate
backslashes like it does if your rowsourcetype is set to value.

\\\\MyPath displays properly if value, but displays as disabled '\\\MyPath'
if in an array. The listbox and combobox both handle these the same way, and
are not consistent for different rowsourcetypes. So - my question now
becomes, how do you get the following:

\\MyPath

To appear enabled or disabled, if your rowsource is an array? Without the
leading space?


"Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
news:ecMpCr1mEHA.3712@TK2MSFTNGP15.phx.gbl...
> Ook,
>
> After re-reading your post, I noticed you don't want the space, so when to
> the VFP8 help and the solutions is pretty simple:
>
> lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
> this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"
>
> ** This is from the VFP8 Help file **
> If the expression begins with multiple backslashes, the item is not
> disabled. If you want to disable an item that begins with multiple
> backslashes, add a backslash and a close bracket (]) to the beginning of
the
> item. For example, the following would disable the UNC path item in the
list
> box:
> MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
> --
> Edhy Rijo
> Programming System Solutions www.progytech.com
> Bronx NY
>
>
> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
> > Hi Ook,
> >
> > I tested this from the INIT() of a ListBox in VFP8
> >
> > lcServerPath = "\\\server\Application Share Folder"
> > this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
> >
> > --
> > Edhy
> >
> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
> >>I have the need to disable listbox entries that start with '\\', such as
a
> >> network path. Normally, you start the entry with '\', and it will be
> >> disabled. If you have a legitimate backslash, you would change it two
> >> backslashes so that it is enabled and displays a single backslash.
BUT -
> >> if
> >> you have two or more backslashes, it will just display backslashes and
> >> not
> >> disable the entry. How would you get \\SomePath to appear as disabled?
I
> >> can
> >> put a space between a backslash and the rest of the item, but then I
have
> >> a
> >> disabled entry with a leading space.
> >>
> >>
> >
> >
>
>



Re: How to disable listbox entry by Ook

Ook
Wed Sep 15 16:24:46 CDT 2004

Really? Amazing! </sarcasm>

The docs lie. If the rowsourcetype is an array, it does not evaluate
backslashes like it says it does.


"Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
news:OFgJok2mEHA.324@TK2MSFTNGP11.phx.gbl...
> When I need help on something specific, I right click the control or
> property and choose help!
>
> --
> Edhy Rijo
> Programming System Solutions www.progytech.com
> Bronx NY
>
>
> "Ook" <usenet@nospam.emberts.com> wrote in message
> news:OWWny61mEHA.1800@TK2MSFTNGP15.phx.gbl...
> > Where in the help file did you find this?
> >
> > "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> > news:ecMpCr1mEHA.3712@TK2MSFTNGP15.phx.gbl...
> >> Ook,
> >>
> >> After re-reading your post, I noticed you don't want the space, so when
> >> to
> >> the VFP8 help and the solutions is pretty simple:
> >>
> >> lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
> >> this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"
> >>
> >> ** This is from the VFP8 Help file **
> >> If the expression begins with multiple backslashes, the item is not
> >> disabled. If you want to disable an item that begins with multiple
> >> backslashes, add a backslash and a close bracket (]) to the beginning
of
> > the
> >> item. For example, the following would disable the UNC path item in the
> > list
> >> box:
> >> MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
> >> --
> >> Edhy Rijo
> >> Programming System Solutions www.progytech.com
> >> Bronx NY
> >>
> >>
> >> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> >> news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
> >> > Hi Ook,
> >> >
> >> > I tested this from the INIT() of a ListBox in VFP8
> >> >
> >> > lcServerPath = "\\\server\Application Share Folder"
> >> > this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
> >> >
> >> > --
> >> > Edhy
> >> >
> >> > "Ook" <usenet@nospam.emberts.com> wrote in message
> >> > news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
> >> >>I have the need to disable listbox entries that start with '\\', such
> >> >>as
> > a
> >> >> network path. Normally, you start the entry with '\', and it will be
> >> >> disabled. If you have a legitimate backslash, you would change it
two
> >> >> backslashes so that it is enabled and displays a single backslash.
> > BUT -
> >> >> if
> >> >> you have two or more backslashes, it will just display backslashes
and
> >> >> not
> >> >> disable the entry. How would you get \\SomePath to appear as
disabled?
> > I
> >> >> can
> >> >> put a space between a backslash and the rest of the item, but then I
> > have
> >> >> a
> >> >> disabled entry with a leading space.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
>



Re: How to disable listbox entry by Ook

Ook
Wed Sep 15 16:35:50 CDT 2004

And if rowsourcetype is 6 (fields), it's different still. Oh, I love VFP :-)

"Ook" <usenet@nospam.emberts.com> wrote in message
news:%23FL4tp2mEHA.2764@TK2MSFTNGP11.phx.gbl...
> Really? Amazing! </sarcasm>
>
> The docs lie. If the rowsourcetype is an array, it does not evaluate
> backslashes like it says it does.
>
>
> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> news:OFgJok2mEHA.324@TK2MSFTNGP11.phx.gbl...
> > When I need help on something specific, I right click the control or
> > property and choose help!
> >
> > --
> > Edhy Rijo
> > Programming System Solutions www.progytech.com
> > Bronx NY
> >
> >
> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > news:OWWny61mEHA.1800@TK2MSFTNGP15.phx.gbl...
> > > Where in the help file did you find this?
> > >
> > > "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> > > news:ecMpCr1mEHA.3712@TK2MSFTNGP15.phx.gbl...
> > >> Ook,
> > >>
> > >> After re-reading your post, I noticed you don't want the space, so
when
> > >> to
> > >> the VFP8 help and the solutions is pretty simple:
> > >>
> > >> lcServerPath = ("\]\\\MyServer\\MyMachine\\MyFolder")
> > >> this.RowSource = "Any Item,"+ lcServerPath + ",\Another Item"
> > >>
> > >> ** This is from the VFP8 Help file **
> > >> If the expression begins with multiple backslashes, the item is not
> > >> disabled. If you want to disable an item that begins with multiple
> > >> backslashes, add a backslash and a close bracket (]) to the beginning
> of
> > > the
> > >> item. For example, the following would disable the UNC path item in
the
> > > list
> > >> box:
> > >> MyForm.List1.AddItem("\]\\\MyServer\\MyMachine\\MyFolder")
> > >> --
> > >> Edhy Rijo
> > >> Programming System Solutions www.progytech.com
> > >> Bronx NY
> > >>
> > >>
> > >> "Edhy Rijo" <erijo@msn.com.NO_SPAM> wrote in message
> > >> news:u4Eobn1mEHA.644@tk2msftngp13.phx.gbl...
> > >> > Hi Ook,
> > >> >
> > >> > I tested this from the INIT() of a ListBox in VFP8
> > >> >
> > >> > lcServerPath = "\\\server\Application Share Folder"
> > >> > this.RowSource = "Any Item,"+"\ "+lcServerPath + ",Another Item"
> > >> >
> > >> > --
> > >> > Edhy
> > >> >
> > >> > "Ook" <usenet@nospam.emberts.com> wrote in message
> > >> > news:uYBNdk0mEHA.3520@TK2MSFTNGP11.phx.gbl...
> > >> >>I have the need to disable listbox entries that start with '\\',
such
> > >> >>as
> > > a
> > >> >> network path. Normally, you start the entry with '\', and it will
be
> > >> >> disabled. If you have a legitimate backslash, you would change it
> two
> > >> >> backslashes so that it is enabled and displays a single backslash.
> > > BUT -
> > >> >> if
> > >> >> you have two or more backslashes, it will just display backslashes
> and
> > >> >> not
> > >> >> disable the entry. How would you get \\SomePath to appear as
> disabled?
> > > I
> > >> >> can
> > >> >> put a space between a backslash and the rest of the item, but then
I
> > > have
> > >> >> a
> > >> >> disabled entry with a leading space.
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>